The method of deleting files in batches under Linux system is very simple, but it is more difficult to delete files in a specified time. It needs to be implemented by Linux scripts. The following small series will introduce you to the method of deleting files in Linux within a specified time.
find find deleted files
For example finds all ending in .txt files from the current directory and display them on the screen, the command line:
find. -name ‘*.txt’ -print
Find the files with the two suffixes and change to the following usage:
find . ( -name *.xml -o -name *.sh )
Another example is to find a file with the symbolic connection from the root directory and delete it. Command behavior:
find /- Type l -exec rm {} ;
Find only files, not including directories (this line, can't add --print, adds an error):
find . -type f
Another example is to find all the files of the user tom from the current directory and display them on the screen. The command behavior is:
find . -user ‘tom’ -print
Another example is to display the .c file name in the current directory that is larger than 20 bytes. The command behavior is:
find . -name “*.c” -size +20c -print
Displays the name of the file that was accessed just 10 days ago in the current directory. Command behavior:
find . -atime 10 -print
Displays the file name that was accessed less than 10 days ago in the current directory. Command behavior:
find . -atime -10 -print
Find files or directories with permissions of 640 in the /home directory. Command behavior:
find /home -perm 640
Search under the root directory Files larger than 100KB, and display, command behavior:
find /-size +100K -print
Previous12Next Total 2 Pages
Before the small series introduced the svn command to everyone, can not read the Linux SVN tool comm
The Linux system tmux is an efficient programming tool that can greatly improve the efficiency of pr
OpenWRT is an embedded Linux system. Friends who want to understand the embedded Linux system are bl
VPN is a virtual private network. It has the characteristics of low cost and easy t
How Linux Systems Monitor Mogilefs Storage Nodes
How to embed all LaTex fonts in PDF files under Linux
How to modify the SSH port number in Linux?
Linux using shell scripts to measure high-speed network traffic
Linux how to use the ss command to view the socket status
Linux system how to prevent CC attack
How to configure Mentohust network on Ubuntu
Install the deb package operation instance on Ubuntu
How Linux uses Sysdig to troubleshoot system faults
Linux system how to use the mount command and software to mount the ISO file
Linux system uses the command line to execute the php file transfer step
Xp system to modify the ip prompt to restart the solution
How does Win7 transfer my documents to the D drive? How to transfer my documents to D drive
Win8/win10 system removes the method of bringing the Microsoft input method
Win8 how to replace the boot interface and fast lock screen skills
Nokia Music for Windows 8 application to get started
WP8/WP8.1 keyboard is actually the Bing input method
Win7 system three different activation software have advantages
Win10 user suggestions: Edge browser should be added to the custom download location settings