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


How rsync automatically allows ssh key fingerprints

When we use ssh to connect to the host for the first time, a fingerprint confirmation of the host key will be displayed. Sometimes use rsync for some automated scheduling, maybe the remote host has changed and needs to be automatically allowed, How to let ssh automatically allow fingerprints to connect without manually pressing yes in interactive mode?


WebShell Function Introduction and Precautions

I suddenly wanted to introduce what is WebShell, so I found one on the Internet. Its functions are quite good. But I still wanted some features, so I spent three nights making some small optimizations for him. If you haven't heard of WebShell yet, take a look at this video. If you like my optimized version, please give me a like, thank you.


How to install the monitor tool htop on CentOS

Htop is a free (GPL) ncurses-based program monitor tool for Linux. It is similar to top, but allows you to scroll vertically and horizontally, so you can see the full command line running on the system, And you can view them as program trees, select multiple programs and operate them.