Jump to content

Delete files older than a specific date and Time

From TetraWiki
Revision as of 03:12, 12 June 2014 by Biswajit (talk | contribs) (Created page with " Suppose you want to delete files before '''10 June 2014 , 09:50 AM''' touch -t 201406100950 /tmp/timeref Then find . ! -newer /tmp/timeref -exec rm {} \; This Comman...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Suppose you want to delete files before 10 June 2014 , 09:50 AM

touch -t 201406100950 /tmp/timeref

Then

find . ! -newer /tmp/timeref -exec rm {} \;

This Command will delete all mail which are older than 10 June 2014 , 09:50 AM

Caution: Please Be aware of the Time Zone of The Server before deleting