How to do things
AI Noob vs. Pro

List biggest files
List newest files
Show subdir sizes
Search in files
Replace word in files
List dir differences
Send files in LAN

Free Open Source:

Swiss File Knife

a command line
multi function tool.

remove tabs
list dir sizes
find text
filter lines
find in path
collect text
instant ftp or
http server
file transfer
send text
patch text
patch binary
run own cmd
convert crlf
dup file find
md5 lists
fromto clip
hexdump
split files
list latest
compare dirs
save typing
trace http
echo colors
head & tail
dep. listing
find classes
speed shell
zip search
zip dir list

Depeche View
Source Research
First Steps

windows GUI
automation

command line
file encryption

free external tools,
zero install effort,
usb stick compliant:

zip and unzip
diff and merge
reformat xml
reformat source

cpp sources

log tracing
mem tracing
hexdump
using printf

articles

embedded
stat. c array
stat. java array
var. c array
var. java array
view all text
as you type
surf over text
find by click
quick copy
multi view
find nearby
fullscreen
bookmarks
find by path
expressions
location jump
skip accents
clip match
filter lines
edit text
highlight
load filter
hotkey list
receive text
send in C++
send in Java
smooth scroll
touch scroll
fly wxWidgets
fly over Qt
search Java

Supersonic Text File Search - Free Download

find text patterns in text and binary files like .txt, .html, .doc or .xls with a free open source command line tool for Windows, Mac OS X, Linux and Raspberry Pi.
  • 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-64.exe sfk and chmod +x sfk then ./sfk
  • Linux: type mv sfk-linux-64.exe sfk and chmod +x sfk then ./sfk. OS X and Linux syntax may differ, check the help within the tool.
sfk find [opts] singledir word [word2] [word3] ... [-names]

search text in text files. if multiple words are given
then only areas containing all words are listed.

this is a basic command to search only static words.
type sfk xfind to use wildcards and expressions.

options
   -arc       XE: include content of .zip .jar .tar etc. archives
                  as deep as possible, including nested archives.
              XD: demo will read first 1000 bytes of each entry.
   -qarc      quick read top level archives but not nested ones.
   -case      search case sensitive. default is case insensitive.
              for details type: sfk help nocase
   -bin       do not autodetect file content, process all as binary.
              can also be used for floating text files (one linefeed per
              paragraph, not per line). may produce unwanted line breaks
              with short-lined text.
   -len=n     increase the line length for text extracted from binary
              to find longer strings. maximum is 600 approx.
   -wide      same as -len=300
   -delim=.,; set delimiters to enable soft word wrapping.
              default is to soft wrap only on white space.
   -hidden    include hidden and system files.
   -c         case-sensitive search (not default).
   -lnum      list line numbers of hits.
   -nocol     disable color highlighting of output (sfk help colors).
   -names     list only names of files containing at least one hit.
   -notnames  list only names of files not containing any hit.
   -count     list no. of matching lines per file. implies -names.
              requires -text option, cannot be used with binary files.
   -quiet     do not show "scan" progress info.
   -pure      do not list filenames, list only text hits without indent.
              default when specifying a single file as first parameter.
   -verbose   tells in detail what find is actually searching for.
   -nocconv   disable umlaut and accent character conversions during
              output to console. "sfk help opt" for details.
   -firsthit  show only first matching result per file.
   -justrc    print nothing to terminal, just set return code.
   -head=n    read only first n text lines from files.

search limitations within binary data
   by default, only lines up to 80 characters are extracted
   from binary data, so strings longer than this may not be found.
   this can be changed by option -len=n or -wide.

pattern support
   no wildcards or slash patterns are supported, with one exception:
   if you need to find patterns starting with "-" or "+", prefix
   them with backslash \ to avoid misinterpretation as options.

return codes for batch files
   0 = no matches, 1 = matches found, >1 = major error occurred.
   see also "sfk help opt" on how to influence error processing.

aliases
   sfk findbin  same as sfk find but reads also binary files.

see also
   --- open source commands ---
   sfk xfind     search  wildcard text in   plain text files
   sfk ofind     search  in office files    .docx .xlsx .ods
   sfk xfindbin  search  wildcard text in   text/binary files
   sfk xhexfind  search  in text/binary with hex dump output
   sfk extract   extract wildcard data from text/binary files
   sfk filter    filter  and edit text with simple wildcards
   sfk find      search  fixed    text in   text        files
   sfk findbin   search  fixed    text in   text/binary files
   sfk hexfind   search  fixed    text in        binary files
   sfk replace   replace fixed    text in   text/binary files
   --- freeware commands ---
   sfk view      GUI tool to search text as you type
   --- xe commercial commands ---
   sfk replace   replace fixed    text with high performance
   sfk xreplace  replace wildcard text in   text/binary files
   sfk help xe   about SFK XE and xreplace with SFK Expressions.

web reference
   http://stahlworks.com/sfk-find

examples
   sfk find . foo bar include
      search text files in current dir for the words foo+bar+include.
      note that the short form syntax supports one directory name,
      and any number of text patterns, but no file name patterns.

   sfk find -pat text1 text2 -dir src1 src2 -file .cpp .hpp
      searches within the specified directories and file masks.

   sfk list src +find -verbose \-pat \\-foo \+list
      find lines containing words "-pat", "\-foo" and "+list"
      in all files of directory src, with verbose search infos.

   sfk find testfiles class +view
      search "class" within "testfiles", and show results
      interactively in Depeche View ("sfk view" for details).
 
example output:

   sfk find testfiles bardriver

   testfiles\FooBank\BarDriver\include\BarDriver.hpp :
      class BarDriver
       BarDriver ( );
       ~BarDriver ( );
   testfiles\FooBank\BarDriver\source\BarDriver.cpp :
      BarDriver::BarDriver( )
      BarDriver::~BarDriver( )
      void BarDriver::runDrawThread( )
   testfiles\FooBank\DB\source\DBController.cpp :
      #include "FooBank/BarDriver/include/BarDriver.hpp"
   testfiles\FooBank\GUI\source\FooGUI.cpp :
      #include "FooBank/BarDriver/include/BarBottle.hpp"
   testfiles\Formats\10-dir-list.txt :
      C:\sfk\testfiles\FooBank\BarDriver
      C:\sfk\testfiles\FooBank\BarDriver\include
      C:\sfk\testfiles\FooBank\BarDriver\source
      C:\sfk\testfiles\FooBank\BarDriver\include\BarBottle.hpp
      C:\sfk\testfiles\FooBank\BarDriver\include\BarDriver.hpp
      C:\sfk\testfiles\FooBank\BarDriver\include\BarGlass.hpp
   testfiles\Formats\12-foo-jam.txt :
      testfiles\FooBank\BarDriver\include\BarBottle.hpp
      testfiles\FooBank\BarDriver\include\BarDriver.hpp
      class BarDriver
       BarDriver ( );
       ~BarDriver ( );
      testfiles\FooBank\BarDriver\include\BarGlass.hpp
      testfiles\FooBank\BarDriver\include\BarMug.hpp
      testfiles\FooBank\BarDriver\source\BarBottle.cpp
      testfiles\FooBank\BarDriver\source\BarDriver.cpp
      BarDriver::BarDriver( )
      BarDriver::~BarDriver( )
      void BarDriver::runDrawThread( )
      testfiles\FooBank\BarDriver\source\BarGlass.cpp
      testfiles\FooBank\BarDriver\source\BarMug.cpp

see also:

   finding classfiles using sfk list, find and alias.
sfk find [opts] singledir word [word2] 
   [word3] ... [-names]

search text in text files. if multiple 
words are given then only areas containing
all words are listed.

this is a basic command to search only 
static words. type sfk xfind to use
wildcards and expressions.

options
   -arc       XE: include content of .zip 
                  .jar .tar etc. archives
                  as deep as possible,
                  including nested archives.
                  
              XD: demo will read first 1000 
                  bytes of each entry.
   -qarc      quick read top level archives 
              but not nested ones.
   -case      search case sensitive. 
              default is case insensitive.
              for details type: sfk help
              nocase
   -bin       do not autodetect file 
              content, process all as
              binary. can also be used for
              floating text files (one
              linefeed per paragraph, not
              per line). may produce
              unwanted line breaks with
              short-lined text.
   -len=n     increase the line length for 
              text extracted from binary to
              find longer strings. maximum
              is 600 approx.
   -wide      same as -len=300
   -delim=.,; set delimiters to enable soft 
    word wrapping.
              default is to soft wrap only 
              on white space.
   -hidden    include hidden and system 
              files.
   -c         case-sensitive search (not 
              default).
   -lnum      list line numbers of hits.
   -nocol     disable color highlighting of 
              output (sfk help colors).
   -names     list only names of files 
              containing at least one hit.
   -notnames  list only names of files not 
              containing any hit.
   -count     list no. of matching lines 
              per file. implies -names.
              requires -text option, cannot
              be used with binary files.
   -quiet     do not show "scan" 
              progress info.
   -pure      do not list filenames, list 
              only text hits without indent.
              default when specifying a
              single file as first
              parameter.
   -verbose   tells in detail what find is 
              actually searching for.
   -nocconv   disable umlaut and accent 
              character conversions during
              output to console. "sfk help
              opt" for details.
   -firsthit  show only first matching 
              result per file.
   -justrc    print nothing to terminal, 
              just set return code.
   -head=n    read only first n text lines 
              from files.

search limitations within binary data
   by default, only lines up to 80 
   characters are extracted from binary
   data, so strings longer than this may
   not be found. this can be changed by
   option -len=n or -wide.

pattern support
   no wildcards or slash patterns are 
   supported, with one exception: if you
   need to find patterns starting with "-"
   or "+", prefix them with backslash \ to
   avoid misinterpretation as options.

return codes for batch files
   0 = no matches, 1 = matches found, >1 
   = major error occurred. see also "sfk
   help opt" on how to influence error
   processing.

aliases
   sfk findbin  same as sfk find but 
                reads also binary files.

see also
   --- open source commands ---
   sfk xfind     search  wildcard text in 
                         plain text files
   sfk ofind     search  in office files  
                         .docx .xlsx .ods
   sfk xfindbin  search  wildcard text in 
                         text/binary
                         files
   sfk xhexfind  search  in text/binary 
                         with hex dump
                         output
   sfk extract   extract wildcard data 
                 from text/binary files
   sfk filter    filter  and edit text 
                 with simple wildcards
   sfk find      search  fixed    text in 
                         text
                         files
   sfk findbin   search  fixed    text in 
                         text/binary
                         files
   sfk hexfind   search  fixed    text in 
                         binary
                         files
   sfk replace   replace fixed    text in 
                 text/binary files
   --- freeware commands ---
   sfk view      GUI tool to search text 
                 as you type
   --- xe commercial commands ---
   sfk replace   replace fixed    text 
                 with high performance
   sfk xreplace  replace wildcard text in 
                 text/binary files
   sfk help xe   about SFK XE and 
                 xreplace with SFK
                 Expressions.

web reference
   http://stahlworks.com/sfk-find

examples sfk find . foo bar include search text files in current dir for the words foo+bar+include. note that the short form syntax supports one directory name, and any number of text patterns, but no file name patterns. sfk find -pat text1 text2 -dir src1 src2 -file .cpp .hpp searches within the specified directories and file masks. sfk list src +find -verbose \-pat \\ -foo \+list find lines containing words "-pat", "\ -foo" and "+list" in all files of directory src, with verbose search infos. sfk find testfiles class +view search "class" within "testfiles", and show results interactively in Depeche View ("sfk view" for details). example output: sfk find testfiles bardriver testfiles\FooBank\BarDriver\include\ BarDriver.hpp : class BarDriver BarDriver ( ); ~BarDriver ( ); testfiles\FooBank\BarDriver\source\ BarDriver.cpp : BarDriver::BarDriver( ) BarDriver::~BarDriver( ) void BarDriver::runDrawThread( ) testfiles\FooBank\DB\source\ DBController.cpp : #include "FooBank/BarDriver/include/BarDriver. hpp" testfiles\FooBank\GUI\source\ FooGUI.cpp : #include "FooBank/BarDriver/include/BarBottle.hpp" testfiles\Formats\10-dir-list.txt : C:\sfk\testfiles\FooBank\BarDriver C:\sfk\testfiles\FooBank\BarDriver\ include C:\sfk\testfiles\FooBank\BarDriver\ source C:\sfk\testfiles\FooBank\BarDriver\ include\BarBottle.hpp C:\sfk\testfiles\FooBank\BarDriver\ include\BarDriver.hpp C:\sfk\ testfiles\FooBank\BarDriver\include\ BarGlass.hpp testfiles\Formats\12-foo-jam.txt : testfiles\FooBank\BarDriver\include\ BarBottle.hpp testfiles\FooBank\BarDriver\include\ BarDriver.hpp class BarDriver BarDriver ( ); ~BarDriver ( ); testfiles\FooBank\BarDriver\include\ BarGlass.hpp testfiles\FooBank\BarDriver\include\ BarMug.hpp testfiles\FooBank\BarDriver\source\ BarBottle.cpp testfiles\FooBank\BarDriver\source\ BarDriver.cpp Ba rDriver::BarDriver( ) BarDriver::~BarDriver( ) void BarDriver::runDrawThread( ) testfiles\FooBank\BarDriver\source\ BarGlass.cpp testfiles\FooBank\ BarDriver\source\BarMug.cpp see also: finding classfiles using sfk list, find and alias.

you are viewing this page in mobile portrait mode with a limited layout. turn your device right, use a desktop browser or buy the sfk e-book for improved reading.

 
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).

 

the Daily Landscape image
the Daily Mobile Background