The find command in Linux has multiple ways to find it. What about the -path -prune parameter in the find command? The following small series will introduce you to the usage of -path -prune in the find command.
If you find the file in the current directory, and there are a lot of files and directories (multi-layer directory) under the current directory, including dir0, dir1 and dir2. . . Such as the directory and dir00, dir01. .dir10, dir11. . Subdirectories.
1. Find all txt suffix files
find in the current directory. /-name *.txt
2. Find the txt suffix file
find in the dir0 directory and subdirectory under the current directory. /-path ‘. /dir0*’ -name *.txt
3. Find the txt suffix file
find in the subdirectory dir00 and its subdirectories under the dir0 directory in the current directory. /-path ‘*dir00*’ -name *.txt
4. Find the txt suffix file
find in a directory other than dir0 and subdirectories. /-path ‘. /dir0*’ -a -prune -o -name *.txt -print
Description: -a should be an abbreviation for and, meaning logical operator ‘ or & rsquo; (&&) ; -o should be an abbreviation for or, meaning logical operator ‘ & & rsquo; (
In the Ubuntu system, it is best to check the integrity of the downloaded files (se
In Linux system, in addition to PHP can view the file directory, the shell command
In the Ubuntu system, many users will build more simulators for testing purposes. I
The Fedora 22 version was released in May of this year. A lot of new features have
How to configure a multi-language environment for Linux systems?
Linux uses the hadoop dfs command method
How to take a screenshot in the Linux system login interface?
Linux installation and configuration mongodb method
Fedora system ifconfig and netstat command can not find a solution
Ubuntu uses the command to install qBittorrent
How to adjust the resolution and screen refresh rate of Ubuntu system?
How do Linux systems use the at/crontab directive?
Ubuntu system to install PPA on the terminal Step
How CentOS 6 modifies disk quota limits
Linux system iNode exhausted hard disk can not write files how to do?
Win10 prompts that there is no permission to use network resources.
How do I create a header, footer, and page break? Using style dynamics
Win8.1 system task manager startup items show unmetered how to deal with?
Microsoft re-statement: Will provide SSH
Device Manager Application Tips
Win8 how to set the font in the system
Display abnormality processing method
New Wireless Network Setup Wizard in Windows XP SP2