Weird Situation with Vinux
Tim Chase
blinux.list at thechases.com
Mon Oct 17 23:41:58 UTC 2011
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 | less
This 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
More information about the Blinux-list
mailing list