Linux, more find jewels: Find and Delete files older than date…

Leave a comment

June 20, 2013 by aubreykloppers

I use this quite often and is very useful clearing old files:

find /home/user -type f -mtime +100 -exec rm {} \;

What this does is:

  • find files of type “file/regular file”,
  • modified 100 days ago and
  • delete the file if found.

As a pointer to FIND switches, goto: http://linux.about.com/od/commands/l/blcmdl1_find.htm

cyber7-out

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: