A Linux command a day (22): find command detailed
find Some common examples of some common parameters and some specific uses and considerations.
find Some common examples of some common parameters and some specific uses and considerations.
When using the -find command with the -exec option to process matched files, the -find command passes all the matched files together to exec for execution.
find is a very common Linux command, but we usually find more than just a look, there will be further operations, this is where exec comes into play.
We often have to look for a file in linux, but we don’t know where it is, we can use some of the following commands to search for it.
The whereis command can only be used for program name searching, and only searches binary files (argument -b), man description files (argument -m) and source files (argument -s).
The find command under Linux searches for files in the directory structure and performs the specified operations.
locate allows users to quickly search for a specific file in the file system.
The tail command writes a file to standard output from the specified point.
head and tail are as easy to understand as its name, it is used to display the beginning or end of a certain amount of text blocks, head is used to display the beginning of the file to the standard output, and tail is of course to see the end of the file.
The less tool is also a tool for paging files or other output, and is supposed to be the orthodox linux tool for viewing the contents of files, which is extremely powerful.