Linux File Search and operations
In linux, the most common method to find files is the find command. Let's take a look at how to use the find command:
Find
Find.-name txt // find the file or style folder named txt in the current directory
Find.-type c // character device
Find.-type d // directory
Find/dev-type B // block Device
Find/dev-type s // Network Device
Find/dev-type l // Link Device
Find/dev-type p // pipeline Device
Find.-size 141c // hit a file with 141 bytes
Find.-size + 100c-size-5000c // find the file or folder with the number of bytes greater than 100 and smaller than 5000
Find.-empty // enter an empty file
Find.-perm 644 // The 644 permission is found
Find.-gid 0 // The Group id is 0
Find.-uid 0 // the user ID is 0
Find.-empty-exec rm-rf {}\; // locate the empty file and delete it.
Find.-empty-exec cp {}/root/Desktop/-r \; // find the empty file and copy it to the Desktop