by Devin Yang
(This article was automatically translated.)

Published - 1 year ago ( Updated - 1 year 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

Multiple ssh configuration files for public key authentication

When we use ssh public key authentication, we usually add relevant settings in ~/.ssh/config. If some are used by the company or at home, can multiple configs be used? In fact, it is possible. We can use git to load the company-shared, version-controlled config through Include.

Synology,cli

Change the password of my Synology NAS via the command line

Adjust password by command line synouser --setpw admin &lt;yourpassword&gt;

linux

ubuntu cannot find add-apt-repository command

ubuntu cannot find add-apt-repository command