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-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 httpserv [-h[elp]] [-port=nport] [-rw] The SFK Instant HTTP Server for easy file transfer. default behaviour: * the CURRENT DIRECTORY is made accessible, without subdirs. * any kind of directory traversal (.., / etc.) is blocked. * just ONE CLIENT (browser etc.) can connect at a time. only for trusted environments! sfk httpserv is intended only for personal file transfer between two machines that the user has control of, within a trusted LAN environment. it should not be used to offer files in the internet. if security is important then do not use sfk httpserv but a full scale web server like Apache. options -port=n use other port than default, e.g. -port=81. -port2=n alternative port, used if first port fails. use -port2=0 to disable alternative port. -rw allow write access. displays a single file upload form when accessing "/". -nolist do not provide a content listing, but change any access to "/" into "index.html". -deep allow reading of files in sub directories. only for use with -nolist, as it does not provide sub directory listings. -raw send no http reply header, just raw content. -wide full ftp-like file listing. -headers show incoming request headers. see also sfk ftpserv -h the SFK Instant FTP server. sfk wget a web file download command. web reference http://stahlworks.com/sfk-httpserv How to copy any file between Windows and Linux machines: If the target machine has ANY connection to a local network: - on the source machine, where you have SFK already, type sfk httpserv -port=9090 within the directory from which you want to transfer files. - then, on the target machine, try to open a web browser and to access http://othermachine:9090/ OR type wget http://othermachine:9090/yourfile If that fails (no browser, no gui, no wget command), check if there exists an "ftp" command on the target machine. If so, try: SFK Instant FTP Server for easy file exchange - on another machine where you have SFK already, type sfk ftpserv - then, on the target machine, type ftp othermachine and if the login succeeds, try dir bin get yourfile - if ftp connections fail to work, check if the "ftp" client on the target accepts the command passive then try to "get" again (ftp creates a new connection per file download, which is often blocked by firewalls. the passive command changes the way in which those connections are created.) How to get SFK up and running anywhere: Download the executables for Windows, Linux/lib6 or Linux/lib5 By browser: - http://stahlworks.com/dev/swiss-file-knife.html then click on one of the top links to either download binaries instantly, or look further on sourceforge: - http://sourceforge.net/projects/swissfileknife/ OR On a Linux text console, use one of these: Instant binaries: - wget http://stahlworks.com/dev/sfk/sfk (Linux lib6) - wget http://stahlworks.com/dev/sfk/sfk-lib5 (Linux lib5) Whole distribution package in a .zip (insert version for nnn): - wget http://stahlworks.com/dev/sfk/sfknnn.zip Make sure your system has the real Info-ZIP unzip command, in version 5.50 or higher (just type "unzip" to find out). If nothing is available, get one of these: - wget http://stahlworks.com/dev/unzip-linux-lib6.exe - wget http://stahlworks.com/dev/unzip-linux-lib5.exe OR Apple Macintosh and 64-bit Linux in general: - there are no binary distributions so far, but you may compile the source code easily, even if you're no software developer. first, type "g++" to find out if a compiler exists on your system. if so, download the source code, contained in the sfknnn.zip, from http://sourceforge.net/projects/swissfileknife/ then extract that by "unzip sfknnn.zip", and take a look into do-compile-unix.bat or type: Mac compile: g++ -DMAC_OS_X sfk.cpp patch.cpp inst.cpp -o sfk Linux 64-bit compile: g++ sfk.cpp patch.cpp inst.cpp -o sfk How to prepare the SFK binary under Linux: - after download, you have to type chmod +x sfk-linux.exe to enable execution (the 'x' flag) of sfk. Then simply type ./sfk-linux.exe to get it running (the "./" is often needed as the PATH may not contain the current directory "."). Where to place the SFK executable: Recommendation for Windows: - create a directory structure c:\app\bin then rename sfknnn.exe to sfk.exe, and copy that to c:\app\bin . If you use the "sfk alias" command later, the created alias batch files will also be placed into "c:\app\bin". - extend the Windows Shell Path set PATH=%PATH%;c:\app\bin - make sure your Windows Shell supports command autocompletion and Copy/Paste of text (the QuickEdit and Insert setting), otherwise it is very hard to use! read more by typing sfk help shell - further tools can be installed parallel to "bin" into c:\app This way you avoid the long, blank-character-contaminated, inefficient default paths like "C:\Program Files". Recommendation for Linux: - type "cd" then "pwd" to find out what your account's home directory is. - within your home directory (e.g. /home/users/youruserid/) create a directory "tools" mkdir tools then rename sfk-linux.exe to sfk, and copy that into the tools dir. - extend the PATH like export PATH=$PATH:/home/users/youruserid/tools - then you should be able to run sfk by typing "sfk". By default, there are no colors, as it is not possible to autodetect the background color under Linux. If you like colorful output, type "sfk help color" and read on how to set the "SFK_COLORS" variable (read it careful! if you set a wrong "def:" value, you may end up with white text on white background)
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.