JavaBlog.fr / Java.lu Tools Tools: SFK – A Command Line Tools Collection

Tools: SFK – A Command Line Tools Collection

Here, I want present you a powerfull command line tool for daily tasks named Swiss File Knife (SFK), which a lot of features:

  • Search text and binary files.
  • Filter and replace text in files.
  • Instant FTP and HTTP server, for easy file transfer between machines.
  • List directory tree sizes and files.
  • Zero installation, all-in-one executable.
  • Open source for Windows (9x/NT/XP/Vista/7), Linux and Mac.

SFK simply runs instantly, anywhere. SFK Base is free. SFK Extended Edition can also process .zip .jar .tar.gz and .tar.bz2 contents directly. To use this tool:

  • download the free swiss file knife base from sourceforge.
  • unpack the tool using winzip or unzip.
  • open the Windows Command Line or a Linux shell.

Personaly, I use SFK in order to search a specific class in a lot of jars files:

echo off 
sfk list -zip R:javadeveclipse_workspacesdefault-3.3myprojectlibs | find "DocumentController.class"

with for example the following results:

R:\java\dev\comlipse_workspaces\default-3.3\myproject\target\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\target\myproject-0.1.000.war\WEB-INF\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120328-110646\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120328-110646\myproject-0.1.000.war\WEB-INF\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120329-095643\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120329-095643\myproject-0.1.000.war\WEB-INF\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120329-100611\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120329-100611\myproject-0.1.000.war\WEB-INF\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120417-144045\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\trash\target-20120417-144045\myproject-0.1.000.war\WEB-INF\classes\com\huo\myproject\site\controller\DocumentController.class
R:\java\dev\comlipse_workspaces\default-3.3\myproject\war\WEB-INF\classes\com\huo\myproject\site\controller\DocumentController.class

But SFK makes daily tasks easy a lot of others things: find and extract text in binary files, list dir tree sizes, filter and replace text, run an instant ftp server, http server for easy file transfer, find duplicate files, join many text files into one, create and verify md5 checksum lists, run a command on all files, detab text, create hexdumps from files, trace contents of a tcp connection, find dependencies between files, print colored text to terminal, locate commands in the path, print last lines of a file, convert CR/LF, hex to binary, binary to source code, split and join large files, list the contents of all .zip .jar .tar.gz and .tar.bz2 files…etc.

Source: http://stahlworks.com/dev/swiss-file-knife.html
Download: http://sourceforge.net/projects/swissfileknife/

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Related Post