Tuesday, May 18, 2004

finding all files with same extension

* find . -name "*.txt" -print
o (Print out all names of files with the .txt extension that are in the current directory and its subdirectories)
* find . \( -name "*.cpp" -o -name "*.txt" \) -print
o (Print out all the file names which end with either .cpp or .txt. Note that you have to group multiple expressions with \( and \).)

0 Comments:

Post a Comment

<< Home