Delete / remove old / order files in linux automatically

Code:
find /tmp/test -ctime +60 -delete

The above command  will delete any files created over 60 days ago in the /tmp/test  folder (and all subfolders).

You can add this to a cron job and it will be automatic daily, weekly, monthly

Advertisement

About govath

My name is Alexadros Theofilou im working as an Linux/Windows Administrator in Cyprus.

One response to “Delete / remove old / order files in linux automatically”

  1. Free auto backup says :

    Thanks alot! This is what i was looking for

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.