Tuesday, July 16, 2013

find the files more than 30 days linux / unix

Finding files more than 30 days.

find . -type f -mtime +30

Finding all directories more than 30 days

find . -type d -mtime +30


Find the all files more than 30 days with size gb

find . -type f -mtime +30  | df -g

Find all files more than 30 days  and delete

find . -type f -mtime +30 | | xargs rm

No comments:

Post a Comment