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

Automatically insert program flow tracing statements into C++ code with the free sfk inst command for windows and linux.
  • 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 inst [-revoke] [-redo] [-keep-dates] mtkinc mtkmac -dir ...

  instrument c++ sourcecode with calls to sfk micro tracing kernel.

    mtkinc: path and name of mtktrace.hpp file
    mtkmac: mtk block entry macro name, _mtkb_
    revoke: undo all changes (copy backups back)
    keep-dates: on revoke, also reactivate original file dates
    redo  : redo all changes

       sfk inst mtk/mtktrace.hpp _mtkb_ -dir testfiles !save_ -file .cpp

    NOTE: is is recommended NOT to use "-dir ." within batch files to
          ensure that instrumenting is always done on the correct path.

    read more about the sfk micro tracing kernel in the mtk/ dir.
 
NOTE:
   sfk inst is an experimental command, coming with no support.
   do not check-in any source code modified by this command -
   it is intended only to create experimental, temporary debug
   versions of applications that fail to be traced otherwise.

links to the mtk/ include files:

   mtk/mtktrace.hpp
   mtk/mtktrace.cpp

example with outputs:

   sfk inst mtk/mtktrace.hpp _mtkb_ -dir theproj !save_ -file .cpp

      inst'ed: theproj\FooBank\BarDriver\source\BarBottle.cpp, 2 hits
      inst'ed: theproj\FooBank\BarDriver\source\BarDriver.cpp, 3 hits
      inst'ed: theproj\FooBank\BarDriver\source\BarGlass.cpp, 2 hits
      inst'ed: theproj\FooBank\BarDriver\source\BarMug.cpp, 2 hits
      inst'ed: theproj\FooBank\DB\source\DBController.cpp, 2 hits
      inst'ed: theproj\FooBank\GUI\source\FooGUI.cpp, 2 hits

   Resulting output files (inserted statements highlighted in red):

      :file:
      theproj\FooBank\BarDriver\source\BarBottle.cpp
      #include "mtk/mtktrace.hpp" // [instrumented]
      #include "Trace.hpp"
      
      BarBottle::BarBottle( )
      {_mtkb_("BarBottle::BarBottle");
         pClSomething = 0;
      }
      
      BarBottle::~BarBottle( )
      {_mtkb_("BarBottle::~BarBottle");
         if (pClBotte) {
            delete pClSomething = 0;
            pClSomething = 0;
         }
      }
      
      :file:
      theproj\FooBank\BarDriver\source\BarDriver.cpp
      #include "mtk/mtktrace.hpp" // [instrumented]
      #include "BaseLib/Trace/include/Trace.hpp"
      
      BarDriver::BarDriver( )
      {_mtkb_("BarDriver::BarDriver");
         pClBottle = 0;
      }
      
      BarDriver::~BarDriver( )
      {_mtkb_("BarDriver::~BarDriver");
         if (pClBotte) {
            delete pClBottle = 0;
            pClBottle = 0;
         }
      }
      
      void BarDriver::runDrawThread( )
      {_mtkb_("BarDriver::runDrawThread");
         for (long i=0; ;) {
            // dr. stresser: inserted super-important trace output here.
            // do not remove, i need this.
            printf("this is super important traceoutput\n");
         }
      }
      
      :file:
      theproj\FooBank\BarDriver\source\BarGlass.cpp
      #include "mtk/mtktrace.hpp" // [instrumented]

      BarGlass::BarGlass( )
      {_mtkb_("BarGlass::BarGlass");
         pClSomething = 0;
      }
      
      BarGlass::~BarGlass( )
      {_mtkb_("BarGlass::~BarGlass");
         if (pClBotte) {
            delete pClSomething = 0;
            pClSomething = 0;
         }
      }
      
      :file:
      theproj\FooBank\BarDriver\source\BarMug.cpp
      #include "mtk/mtktrace.hpp" // [instrumented]
      #include "FooBank/BarDriver/include/SeldomUsedClass.hpp"
      
      BarMug::BarMug( )
      {_mtkb_("BarMug::BarMug");
         pClSomething = 0;
      }
      
      BarMug::~BarMug( )
      {_mtkb_("BarMug::~BarMug");
         if (pClBotte) {
            delete pClSomething = 0;
            pClSomething = 0;
         }
      }
      
      :file:
      theproj\FooBank\DB\source\DBController.cpp
      #include "mtk/mtktrace.hpp" // [instrumented]
      #include "FooBank/DB/include/DBController.hpp"
      #include "FooBank/BarDriver/include/BarDriver.hpp"
      
      DBController::DBController()
      {_mtkb_("DBController::DBController");
         pClManager = 0;
      
         char *pblast = 0;
         printf("yeee\n");
         // dr. looney: this is superimportant fix.
         // do not remove.
         *pblast = '\0';
         printf("- ho.\n");
      }
      
      DBController::~DBController()
      {_mtkb_("DBController::~DBController");
         if (pClManager) {
            delete pClManager;
            pClManager = 0;
         }
      }
      
      :file:
      theproj\FooBank\GUI\source\FooGUI.cpp
      #include "mtk/mtktrace.hpp" // [instrumented]
      #include "FooBank/GUI/include/FooGUI.hpp"
      #include "FooBank/BarDriver/include/BarBottle.hpp"
      
      FooGUI::FooGUI()
      {_mtkb_("FooGUI::FooGUI");
         pClWindow = 0;
      }
      
      FooGUI::~FooGUI()
      {_mtkb_("FooGUI::~FooGUI");
         if (pClWindow) {
            delete pClWindow;
            pClWindow = 0;
         }
      }
sfk inst [-revoke] [-redo] [-keep-dates] 
   mtkinc mtkmac -dir ...

 instrument
   c++ sourcecode with calls to sfk micro
   tracing kernel.

 mtkinc: path and
   name of mtktrace.hpp file
 mtkmac:
   mtk block entry macro name, _mtkb_
   revoke: undo all changes (copy backups
   back)
 keep-dates: on revoke, also
   reactivate original file dates
 redo
   : redo all changes

  sfk inst mtk/
   mtktrace.hpp _mtkb_ -dir testfiles
   !save_ -file .cpp

 NOTE: is is
   recommended NOT to use "-dir ." within
   batch files to
  ensure that
   instrumenting is always done on the
   correct path.

 read more about the
   sfk micro tracing kernel in the mtk/ dir.
   NOTE:
 sfk inst is an
   experimental command, coming with no
   support.
 do not check-in any source
   code modified by this command -
 it is
   intended only to create experimental,
   temporary debug
 versions of
   applications that fail to be traced
   otherwise.

links to the mtk/ include
   files:

 mtk/mtktrace.hpp
 mtk/
   mtktrace.cpp

example with outputs: sfk inst mtk/mtktrace.hpp _mtkb_ -dir theproj !save_ -file .cpp inst'ed: theproj\FooBank\BarDriver\ source\BarBottle.cpp, 2 hits inst'ed: theproj\FooBank\BarDriver\ source\BarDriver.cpp, 3 hits inst'ed: theproj\FooBank\BarDriver\ source\BarGlass.cpp, 2 hits inst'ed: theproj\FooBank\BarDriver\ source\BarMug.cpp, 2 hits inst'ed: theproj\FooBank\DB\source\DBController. cpp, 2 hits inst'ed: theproj\ FooBank\GUI\source\FooGUI.cpp, 2 hits Resulting output files (inserted statements highlighted in red): :file: theproj\FooBank\BarDriver\ source\BarBottle.cpp #include "mtk/ mtktrace.hpp" // [instrumented] #include "Trace.hpp" BarBottle::BarBottle( ) {_mtkb_("BarBottle::BarBottle"); pClSomething = 0; } BarBottle::~BarBottle( ) {_mtkb_("BarBottle::~BarBottle"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\ BarDriver\source\BarDriver.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "BaseLib/ Trace/include/Trace.hpp" BarDriver::BarDriver( ) {_mtkb_("BarDriver::BarDriver"); pClBottle = 0; } BarDriver::~BarDriver( ) {_mtkb_("BarDriver::~BarDriver"); if (pClBotte) { delete pClBottle = 0; pClBottle = 0; } } void BarDriver::runDrawThread( ) {_mtkb_("BarDriver::runDrawThread"); for (long i=0; ;) { // dr. stresser: inserted super-important trace output here. // do not remove, i need this. printf("this is super important traceoutput\n"); } } :file: theproj\FooBank\ BarDriver\source\BarGlass.cpp #include "mtk/mtktrace.hpp" // [instrumented] BarGlass::BarGlass( ) {_mtkb_("BarGlass::BarGlass"); pClSomething = 0; } BarGlass::~BarGlass( ) {_mtkb_("BarGlass::~BarGlass"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\ BarDriver\source\BarMug.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/ BarDriver/include/SeldomUsedClass.hpp" BarMug::BarMug( ) {_mtkb_("BarMug::BarMug"); pClSomething = 0; } BarMug::~BarMug( ) {_mtkb_("BarMug::~BarMug"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\DB\ source\DBController.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/DB/include/ DBController.hpp" #include "FooBank/BarDriver/include/BarDriver. hpp" DB Controller::DBController() {_mtkb_("DBControll er::DBController"); pClManager = 0; char *pblast = 0; printf("yeee\n"); // dr. looney: this is superimportant fix. // do not remove. *pblast = '\0'; printf("- ho.\n"); } DBCon troller::~DBController() {_mtkb_("DBControll er::~DBController"); if (pClManager) { delete pClManager; pClManager = 0; } } :file: theproj\FooBank\GUI\source\FooGUI. cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/ GUI/include/FooGUI.hpp" #include "FooBank/BarDriver/include/BarBottle. hpp" FooGUI::FooGUI() {_mtkb_("FooGUI::FooGUI"); pClWindow = 0; } FooGUI::~FooGUI() {_mtkb_("FooGUI::~FooGUI"); if (pClWindow) { delete pClWindow; pClWindow = 0; } }

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 Endless Image 🍣 Sushi