The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

SLQotD by Control 2005-03-08 01:00:14
Simple Linux Question of the Day:

I have a tool that generates a vast number of different output files. I only need two of those files per iteration, namely *.ptl and *.ptc

The other files are taking up a lot if space, and I have to delete them all from time to time. So far, I've been moving all the *.ptc and *.ptl files to a temp directory, then removing everything else, then moving the files back to where they belong.
Now I was wondering if there's a one line shell command that removes everything except what I tell it to. Something like

'rm -rf * -except *.ptl *.ptc'

is there?
[ Reply ]
  Completely different solution.. by bonzo2005-03-08 01:02:50
    Additional comment to my solution.. by bonzo2005-03-08 01:06:36
      WHAT!? by reshurc2005-03-08 01:13:57
    No much of a solution by Control2005-03-08 01:13:58
  I'd suggest find... by diGriz2005-03-08 01:04:54
  Question by reshurc2005-03-08 01:05:07
    here's something I made just now... by reshurc2005-03-08 01:15:25
      That's about what I'm doing now by Control2005-03-08 01:19:07
        Give me a few paths, and I'll by reshurc2005-03-08 01:21:05
          No need by Control2005-03-08 01:36:14
    Not really by Control2005-03-08 01:17:27
      See my other post...with the script, not much but. (n/t) by reshurc2005-03-08 01:18:56
  Maybe just ..... by aix tom2005-03-08 01:35:51
    Now that looks good by Control2005-03-08 01:45:49
      Works! by Control2005-03-08 02:00:26
    Just a question from a regex nubie.. by gibbo_monster2005-03-08 03:06:51
      Should work. by aix tom2005-03-08 03:20:21
  sth like rm -rf *[^\.ptl] (n/t) by c3po2005-03-08 01:39:31
    There's no need for that kind of language! by Control2005-03-08 02:11:37
      man regexp by c3po2005-03-08 03:47:36
        Thank you by Control2005-03-08 03:54:21
  find . -depth -name '*.ptl' -o -name '*.ptc' . . . by HadEnuf2005-03-08 09:55:08

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)