Script to delete files

  • Thread starter Thread starter peterepka
  • Start date Start date
P

peterepka

Hello.

I need to write a script to delete files older than 30 days in the tmp directory of server.

would the following work ?

/tmp -mtime +30 -type f -exec rm {} \;

thanks in advance
Pete

Continue reading...
 
Back
Top