Created
June 22, 2018 02:31
-
-
Save goddoe/3085430f47686669e64217f1d57242d3 to your computer and use it in GitHub Desktop.
Excluding or including specific file with tree command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One way is to use patterns with the -I and -P switches: | |
tree -f -I "bin|unitTest" -P "*.[ch]|*.[ch]pp." your_dir/ | |
The -f prints the full path for each file, and -I excludes the files in the pattern here separated by a vertical bar. The -P switch inlcudes only the files listed in the pattern matching a certain extension. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment