Question on Find Command: - Vs +
Been using Linux for sometime and realized that you have the following option:
find / -name foo.txt (this allows a person to find all of the files) Vs find / +name foo.txt (this allows a person to find any of the files) My sticking point is what is the difference between all Vs any? thanks |
Hmmm ... I'm curious: where did you stumble across this?
While it seems to work (albeit with - let's say - unexpected results), I can't seem to find this invocation referenced in finds documentation? Cheers, Tink |
Output of ls in test directory
Code:
ls Code:
find ./ -name test1 Code:
find ./ +name test1 Code:
find ./ Are you seeing different results? |
Ok, my goof.
I'm studying for my Linux+, and I'm using the following book: Linux+ Study Guide, 3rd Edition by Roderick W Smith. I found this in chp 2 and didn't see that you need to also use, -perm. I then checked the man page for find and now it makes sense: Code:
-perm mode Code:
-perm +mode -perm +mode is the old way of search for any of the permission bits in mode set. thanks |
'-' and '+' also apply to timestamps (ctime, mtime, atime) in find cmd. See man page.
|
All times are GMT -5. The time now is 09:53 PM. |