by Devin Yang
(This article was automatically translated.)

Published - 2 years ago ( Updated - 2 years ago )

This function is very easy to use, but be careful, read first and then delete, the wrong directory will cause Die Miserably

View old data created more than 500 minutes ago< /span>

find . -cmin +500

After confirming that there is no problem, add the -delete parameter to delete

find . -cmin +500 -delete

Files whose creation time exceeds 500 minutes can be deleted by adding the -delete parameter. 🫣

Check the files generated within 5 minutes

find . -cmin -5

Or You want to check all files in the directory that have been modified within 10 minutes. (Extra-topic supplement)

find . -mmin -10

Tags: cli linux macos

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux, cli

How to use the find command to find files that have been changed within 7 days

If we have changed some files, how to find out through the command line?

linux

The old version of CentOS 6.2 compiles the git process

This article uses CentOS 6.2 to rebuild curl and git. The main reason is that the operating system is too old, so I directly build the latest version of git from source.

bash,cli

some commands to check cpu, ram and disk info in linux

Introduce those commands that can be used to check hardware information on the Linux host