• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

Linux script

I want to create a little script to delete file older than 30 day.

i try to find all file older than 30 day with the command
: find / -ctime +30

Does anyone know how to redirect find command output in a rm command ?? Or a rm option to delete file older than 30 day?

thanks
0
jaubm
Asked:
jaubm
1 Solution
 
ahoffmannCommented:
find / -ctime +30 -exec rm {} \;
0
 
jaubmAuthor Commented:
thanks a lot
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now