Skip to content
Todd Hill edited this page Mar 10, 2019 · 21 revisions

Corionis "stomp" is a command-line utility that simply truncates, or clears, the contents of a file.

Originally written for use with a log file monitoring tool to clear log files during software development. Stomp ignores most exceptions. If a file is open by another program it may not be able to be stomped and the content will remain.

Stomp is written in C++. The project compiles using cmake in Windows with the MinGW toolchain and also in Linux with a standard toolchain.

My favorite log monitoring/viewing program is SnakeTail http://snakenest.com/snaketail/.

Usage hint: Create a shortcut for stomp.exe with all the files you want stomped, e.g. program log, Tomcat log, etc., all on one command line.

Disclaimer

The stomp utility is provided for free and “as is” with no guarantee or warranty expressed or implied. If you break it you own both parts.

Port it, extend it, pass it around.

Download

The stomp utility is a command line binary executable program.

Download: Windows x64, stomp.exe.

Download: Debian Linux x64, stomp, Linux Mint, Ubuntu, etc.

Download: Centos x64, stomp, CentOS, RedHat, etc.

There is a fun simple icon in .ico and .png formats in the art/ directory for shortcuts.

Installation

To use from a command line add the directory where you copy the executable in your PATH environment variable.

Usage

stomp [-d][-q] file1 file2 ...

Options:
-d    Delete the file(s) instead of truncating
-q    Quiet, do not output anything

If a path or filename contains spaces enclose it in double-quotes.

Building

Windows

Download or check-out the Stomp project.

Run:

mkdir cmake-build-debug

cd cmake-build-debug

cmake .. -G "MinGW Makefiles"

cd ..

cmake --build .\cmake-build-debug --target stomp -- -j 4

Linux

Download or check-out the Stomp project.

Be sure your development environment is complete.

Debian

apt-get install build-essential manpages-dev gcc-multilib checkinstall

cmake --build ./cmake-build-debug --target stomp -- -j 4

CentOS

yum install libstdc++-static

cmake --build ./cmake-build-debug --target stomp -- -j 2
Clone this wiki locally
You can’t perform that action at this time.