Computing.Net > Forums > Linux > Linux file delete script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Linux file delete script

Reply to Message Icon

Name: Rodney Edmonds
Date: January 27, 2003 at 08:09:59 Pacific
OS: RedHat 8
CPU/Ram: (8) PIII 700Mhz 8GB RAM
Comment:

I need a script to delete all files older than 30 days from the current directory. Script must be recursive. ( search all folders in current dir )



Sponsored Link
Ads by Google

Response Number 1
Name: Dlonra
Date: January 27, 2003 at 08:22:16 Pacific
Reply:

man find
google advanced search
linux find tutorial


0

Response Number 2
Name: Balram Adlakha
Date: January 27, 2003 at 09:22:16 Pacific
Reply:

Shell scripting is quite easy, you can
easily write a script such as that yourself
if you can't find it...actually It may even
be in the example scripts in the scripting
howto on tldp.org (thats called the
_advanced_ shell scripting howto i think,
theres another one but that ain't good...)


0

Response Number 3
Name: David Perry
Date: January 27, 2003 at 10:01:26 Pacific
Reply:

find . -type f -mtime +30 -exec rm -f {} \;


0

Response Number 4
Name: Rodney Edmonds
Date: February 3, 2003 at 09:57:14 Pacific
Reply:

Thanks David..


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Linux file delete script

Reading linux files from winxp www.computing.net/answers/linux/reading-linux-files-from-winxp/25165.html

Accessing Linux files from Windows www.computing.net/answers/linux/accessing-linux-files-from-windows/8277.html

building linux file server www.computing.net/answers/linux/building-linux-file-server/26214.html