3 ms·
There is also the locate command. When combined with grep, they make a fast way to find files and search within them. For example, to find a Java class anywhere
by thangalin 12y ago
There is also the locate command. When combined with grep, they make a fast way to find files and search within them. For example, to find a Java class anywhere on the system:
sudo updatedb
for i in $(locate "*.jar");
do echo $i; jar -tvf $i | grep -Hsi classname;
done
The best you can do with vanilla Windows is search from the root directory, but it could take a while:
for /R %G in (*.jar) do @jar -tvf %G | find "ClassName" > NUL && echo %G
- shadowfox 12y agoFor an experience similar to locate on Windows + NTFS systems, there is Everything [1]. It also has a command line tool that you can use (well) from the command line. [1] http://www.voidtools.com/ http://www.voidtools.com/