0

How to find recently modified files and delete it

I need to filter the recently modified files in one of my user directory and also it should be removed.

Is there any script i need to run...??

connor
asked Feb 6, 2017
1 Answer
0

Find command is enough to do this process...

For example: If some files are modified in test1 user's Desktop, use the following command.

# find /home/test1/Desktop -cmin -60

This command will give the modified files for last 60 minutes, for days just change it to -ctime and mention the days.

To find and delete with the same command, use below

# find /home/test1/Desktop -cmin -60 -exec rm -f {}\;
View More
jagannatharumugam
answered Feb 7, 2017
Your Answer
||||
 
100:0