Routing the world

Routing & IT System Administration

Delete files older than a year, a month, a week…

with 2 comments

Recently I need to purge my Backup Disk to release new available space. I found this command to delete files older than 364 days. You can change this value to the one you need.

find -maxdepth 1 -mtime +364 *-exec rm -f {} \;

Advertisements

Written by Root

October 13, 2010 at 10:06

Posted in Linux

Tagged with

2 Responses

Subscribe to comments with RSS.

  1. I think that the command is not properly rendered. It should be


    find -maxdepth 1 -mtime +364 * -exec rm -f '{}' \;

    aprendizdetodo

    November 2, 2010 at 11:44

    • Thanks for the advice I fogot the ” ‘ “

      Root

      November 3, 2010 at 17:18


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: