Archive

Archive for July 12, 2010

Delete files created one day before in unix

Solution:
======
find . -name “*.txt” -type f -mtime +1 -exec rm -f {} \;

Description:
========
       In the current directory(. dot) look for the files with “txt” extension and created one day before,delete those files.

Advertisements
Categories: Technical, unix commands

Delete files created 30 mins before in unix

Solution:
======
find . -name “*.txt” -type f -amin +30 -exec rm -f {} \;

Description:
========
       In the current directory(. dot) look for the files with “txt” extension and created half an hour before,delete those files.

Categories: Technical, unix commands