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

Print the first or last lines of a file, follow changes, and optionally filter the output, replacing or highlighting text parts with a free open source tool for the Windows command line, Mac OS X Terminal, Linux shell or 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 tail [-lines=n] [-f[ollow] [filename]
sfk ... +[t]tail [-lines=n]

1. print last lines of a file, optionally following changes.
   to use file content processing, provide a single filename.

2. print last text lines procuded by a previous command.
   to process chain text ttail is recommended.

options
   -lines=n     print last n lines (default is 10).
   -follow      or -f waits for file changes, printing them endlessly.
                if file is recreated or shrunk, rereads the last lines.
                to post-process tail output, e.g. with +filter, always
                add +loop at the end of the command sequence.
   -nowait      if tail is reached multiple times in a chain by +loop
                then do not wait for a file size change but force
                stepping of the command chain.
   -quiet       do not tell verbosely about read restarts.
   -polltime=n  with -follow, specifies the delay in milliseconds before
                the file is checked again for changes. default is 500.
   -altsize     use a different method to determine the file size
                (stat instead of seek). may help if the default method
                fails to read the file, or to improve performance.
   -verbose     tell in detail what is done.

see also
   sfk filter -tail=n  read and search last n lines of text files.
   sfk view     GUI tool to view all text files of a folder, then jump
                through file ends by ctrl+end.

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

examples
   sfk tail -follow logs\access.log
      immediately lists last lines, then all added lines over time.
   sfk tail -f c:\temp\log.txt +filter -+error: -+warning: +loop
      endless filter of error and warning messages from log.txt.

example sfk script with conditional execution
  file logfilter.txt:
    sfk label checklog
       +tail -follow logfile.txt
       +tee toterm +storetext
       +filter -+error: -justrc
       +if "rc>0" call myalert
       +gettext +filter -+alldone: -justrc
       +if "rc>0" stop
       +loop +end
    sfk label myalert
       +then run -yes "myalert.bat" +end
  sfk script logfilter.txt
     will run myalert.bat whenever errors appear in logfile.txt.
     the script stops as soon as "alldone" appears in the log.
     to allow double filtering of the chain text it must be
     stored before the first filter, then restored.
 
   scripted example

   if you want to both tail and filter on several phrases,
   the command may become hard to read and to edit. as an
   alternative, you may put it into a batch embedded sfk script,
   e.g. under windows, create a file

      filtlog.bat:
         
         @echo off
         sfk script filtlog.bat -from begin
         goto xend
         
         sfk label begin
         
            +tail -f log.txt
         
            +filter
         
               -high red      error:*
               -high yellow   warning:*
               -high blue     debug:*
         
            +loop
         
         :xend
         
   then type "filtlog". creating command sequences this way
   allows better readability, and easy editing in any editor.

see also

   sfk filter   - all options for selection and post-processing of text
   sfk partcopy - copy byte block from the beginning of a file
   sfk script   - how to create script files with sfk commands
   sfk samp     - ready-to-use templates for windows and linux scripts
sfk tail [-lines=n] [-f[ollow] [filename]
sfk ... +[t]tail [-lines=n]

1. print last lines of a file, optionally 
following changes.  to use file content
processing, provide a single filename.

2. print last text lines procuded by a 
previous command.  to process chain text
ttail is recommended.

options
   -lines=n     print last n lines (default 
                is 10).
   -follow      or -f waits for file 
                    changes, printing them
                    endlessly.
                if file is recreated or 
                shrunk, rereads the last
                lines. to post-process tail
                output, e.g. with +filter,
                always add +loop at the end
                of the command sequence.
   -nowait      if tail is reached multiple 
                times in a chain by +loop
                then do not wait for a file
                size change but force
                stepping of the command
                chain.
   -quiet       do not tell verbosely about 
                read restarts.
   -polltime=n  with -follow, specifies the 
                      delay in milliseconds
                      before
                the file is checked again 
                for changes. default is 500.
                
   -altsize     use a different method to 
                determine the file size
                (stat instead of seek). may
                help if the default method
                fails to read the file, or
                to improve performance.
   -verbose     tell in detail what is done.

see also
   sfk filter -tail=n  read and search 
                       last n lines of text
                       files.
   sfk view     GUI tool to view all text 
                files of a folder, then
                jump through file ends by
                ctrl+end.

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

examples
   sfk tail -follow logs\access.log
      immediately lists last lines, then 
      all added lines over time.
   sfk tail -f c:\temp\log.txt +filter 
              -+error: -+warning: +loop
      endless filter of error and warning 
      messages from log.txt.

example sfk script with conditional 
execution
  file logfilter.txt:
    sfk label checklog
       +tail -follow logfile.txt
       +tee toterm +storetext
       +filter -+error: -justrc
       +if "rc>0" call myalert
       +gettext +filter -+alldone: -justrc
       +if "rc>0" stop
       +loop +end
    sfk label myalert
       +then run -yes "myalert.bat" +end
  sfk script logfilter.txt
     will run myalert.bat whenever errors 
     appear in logfile.txt. the script
     stops as soon as "alldone" appears in
     the log. to allow double filtering of
     the chain text it must be stored
     before the first filter, then restored.
     
 
   scripted example

   if you want to both tail and filter on 
   several phrases, the command may become
   hard to read and to edit. as an
   alternative, you may put it into a
   batch embedded sfk script, e.g.
   under windows, create a file

      filtlog.bat:
         
         @echo off
         sfk script filtlog.bat -from begin
         goto xend
         
         sfk label begin
         
            +tail -f log.txt
         
            +filter
         
               -high red      error:*
               -high yellow   warning:*
               -high blue     debug:*
         
            +loop
         
         :xend
         
   then type "filtlog". creating command 
   sequences this way allows better
   readability, and easy editing in any
   editor.

see also sfk filter - all options for selection and post-processing of text sfk partcopy - copy byte block from the beginning of a file sfk script - how to create script files with sfk commands sfk samp - ready-to-use templates for windows and linux scripts

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