|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On 10/17/11 16:11, RiverWind wrote:
The files in question were "rar" and "zip" archives, so how would this syntax work?
To find all .zip and .rar files on your hard-drive, use find $HOME -iname '*.rar' -o -iname '*.zip' 2>/dev/null | less or find / -iname '*.rar' -o -iname '*.zip' 2>/dev/null | lessThis starts the search in either your $HOME directory or the top-level directory ("/"). It then looks for files that are either *.rar or ("-o") *.zip files. Using just "-name" instead of "-iname" would find ".zip" but not ".ZIP" which is sometimes an issue if the source uppercases filenames/extensions, so by using "-iname", it makes the search case-insensitive.
While Hart suggested using "locate", I've had enough times that the locate DB wasn't updated that I usually just use "find" which doesn't require a database to be up-to-date. It's not as fast, but gives me real-time results.
-tim _______________________________________________ Blinux-list mailing list Blinux-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/blinux-list