Commands tagged stdbuf (1)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Backup files older than 1 day on /home/dir, gzip them, moving old file to a dated file.
Useful for backing up old files, custom logs, etc. via a cronjob.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

create a progress bar...
A simple way yo do a progress bar like wget.

check open ports without netstat or lsof

Show simple disk IO table using snmp
Show a simple table with disk IO for the specified host. you monitor a LOT of different thing. Mostly used for MRTG and similar, but this is nice for a quick look, which disk is busy. "public" is your SNMP community ensure that snmpd is running on the host which you intend to monitor

Process command output line by line in a while loop
This snippet allows to process the output of any bash command line by line.

Compress a series of png pictures to an avi movie.
cd /path/to/your/png_pics mencoder "mf://*.png" -mf fps=2 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4 then you can get a movie named output.avi.

send a circular

Prefix every line with a timestamp
Useful to add a timestamp to every line printed to stdout. You can use `-Ins` instead of `-Iseconds` if you want more precision.

Top ten (or whatever) memory utilizing processes (with children aggregate) - Can be done without the multi-dimensional array


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: