Swiss File Knife
a command line
free external tools,
- download the free Swiss File Knife Base from Sourceforge. - open the Windows CMD command line, Mac OS X Terminal or Linux shell. - OS X : type mv sfk-mac-i686.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
there are several ways to search text within 3000 text files: 1.) let your IDE/editor scan the files directly on hard disk. this will take at least 30 seconds, or even several minutes. 2.) index files on hard disk, then scan them. IF your files are indexed already, this will only take seconds. but in most cases, the index is "out of sync", and after the sync is done, depending on your IDE, you may have to click once for every hit to view it's context. but every superfluous click is a boring waste of time. 3.) collect all text files into one large text file, then load this within an editor or IDE. it's simple: loading one large file is at least 10 times faster then loading many small files. therefore sfk snapto was created. on the command line, cd into the toplevel of your working tree, then say sfk snapto=all-src.cpp . which means "collect all text files from the current dir (.), including all subdirectories, into all-src.cpp". when this is done, load all-src.cpp into you favourite editor and run some searches. you will see that jumping through results across everything has become much easier and faster. 4.) collect all text files into one large text file, then load this within depeche view. as an extension to the above example, say dview all-src.cpp the snapfile is loaded. now, to search anything, just type the word, wait one or two seconds, then use MOUSE WHEEL DOWN (or SHIFT+CRSR DOWN for notebook users) to fly through the results. 5.) alternatively, let depeche view load a directory tree directly, without creating a snapfile: cd into your favourite working dir, then say dview . and depeche view will load and display all text files instantly. 6.) how to include also binary files: to collect text files AND .doc .ppt .xls contents from mydir: sfk snapto=all.txt mydir -all .doc .ppt .xls only ASCII text portions will be extracted from .doc, .ppt and .xls files. all binary content will be ignored. alternatively, to view the same contents directly: dview mydir -all .doc .ppt .xls it is recommended to use snapfiles on very large directory trees, and to load the tree directly on smaller ones. for more infos about depeche view, read on here.
sfk is a free open-source tool, running instantly without installation efforts. no DLL's,
no registry changes - just get sfk.exe from the zip package and use it (binaries for
windows, linux and mac are included).
read more about all sfk functions here.