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
jaubmAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ahoffmannConnect With a Mentor Commented:
find / -ctime +30 -exec rm {} \;
0
 
jaubmAuthor Commented:
thanks a lot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.