08 February, 2010

How to delete files older then x-days on Linux

Delete Files Older then x Days on Linux - easy way
in terminal / command line

using "find" command

Code:
find *.txt -mtime +30 | xargs rm
  • "find" executing program
  • "*.txt" file
  • "-mtime +30" files older then 30 days
  • " | " pipe
  • "xargs" executing program
  • "rm" executing command

No comments: