Date: Thu, 13 Feb 2003 13:46:16 -0600 From: Dustin Decker <dustind@moon-lite.com> Subject: Re: bash scripting question Message-ID: <Pine.LNX.4.44.0302131344290.2465-100000@gemini.moon-lite.com>
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 | \---------------------------------------------------------------------------------------/