bash scripting question
Dustin Decker
dustind at moon-lite.com
Thu Feb 13 19:46:16 CST 2003
On Thu, 13 Feb 2003, Eric R. wrote:
> My question is, how would I delete the directory that is several days
> old? i.e. save021003
>
> rm -rf ??
If they're all in the same directory, the "rm -Rf /path" will work.
If you're looking to selectively delete a particular date, you might want
to go into perl or the like, and read the files into an array so you can
select the particular dated file you want to kill.
If you are lazy, like me, you'll probably find the "rm -Rf /path" to suit
you just fine. Be cautious enough to do your directory pruning _before_
you put todays file in there though. <grin>
Dustin
--
/---------------------------------------------------------------------------------------| Dustin
Decker - CNA, MCP. | http://www.dustindecker.com |
| Network Administrator/Engineer | Mobile: 913.579.7117 |
| Preferred Physicians Group | Office: 913.262.2585 |
| http://www.ppminfo.com | |
|---------------------------------------------------------------------------------------|
| |
| "They seem to have learned the habit of cowering before authority even |
| when not actually threatened. How very nice for authority. I decided not |
| to learn this particular lesson." |
| -- Richard Stallman |
---------------------------------------------------------------------------------------/
More information about the Kclug
mailing list