Tag Info

Hot answers tagged


Let us suppose that we have file1 in the current directory. Then: $ find . -maxdepth 0 -name "file1" $ find . file1 -maxdepth 0 -name "file1" file1 Now, let's look at what the documentation states: -maxdepth 0 means only apply the tests and actions to the command line arguments. In my first example above, only the directory . is listed on the ...


find can take many dirs as arguments: find dir1 dir2 dir3 -name pattern so find patern dir just lists everything inside two directories: pattern and dir.


In find, when you use the -name that means only output files with that name as a result


The find command has a switch for that. It's called -exec. $ find . -name '*.dcm' -exec dcmdjpeg {} {} \; This will substitute filenames as they're found by find into the places where there are {}. So in the above we'll be doing this for each filename. dcmdjpeg file1.dcm file1.dcm dcmdjpeg file2.dcm file2.dcm ... If there are spaces in your filenames ...


find itself doesn't support extended atttribute but you can use such as: find ~/ -type f -iname "*" -exec lsattr {} + | grep -v '\-\-\-\-\-\-\-\-\-\-\-\-\-'

Only top voted, non community-wiki answers of a minimum length are eligible