Commands tagged progess meter (1)

What's this? 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

Easy file sharing from the command line using
Requires: curl xsel access to the internet( This is an alias utilizing the service to make sharing files easier from the command line. I have modified the alias provided by to use xsel to copy the resulting URL to the clipboard. The full modified alias is as follows since commandlinefu only allows 255 characters: transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/\ncat /tmp/ | transfer"; return 1; fi if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "$basefile" |xsel --clipboard; else curl --progress-bar --upload-file "-" "$1" |xsel --clipboard ; fi; xsel --clipboard; }

Convert seconds to [DD:][HH:]MM:SS
Converts any number of seconds into days, hours, minutes and seconds. sec2dhms() { declare -i SS="$1" D=$(( SS / 86400 )) H=$(( SS % 86400 / 3600 )) M=$(( SS % 3600 / 60 )) S=$(( SS % 60 )) [ "$D" -gt 0 ] && echo -n "${D}:" [ "$H" -gt 0 ] && printf "%02g:" "$H" printf "%02g:%02g\n" "$M" "$S" }

Retrieve a random command from the API
Can be integrated into your .bashrc if you like. You'll probably want to grep out my name.

Print stack trace of a core file without needing to enter gdb interactively
This does almost the same thing as the original, but it runs the full backtrace for _all_ the threads, which is pretty important when reporting a crash for a multithreaded software, since more often than not, the signal handler is executed in a different thread than the crash happened.

Inverted cowsay
It's quite fun to invert text using "" (ref: ). Slightly more challenging is to flip a whole "cowsay". :-)

Generic shell function for modifying files in-place
Some commands (such as sed and perl) have options to support in-place editing of files, but many commands do not. This shell function enables any command to change files in place. See the sample output for many examples. The function uses plain sh syntax and works with any POSIX shell or derivative, including zsh and bash.

gets your public IP address

Send multiple attachments using mailx
If you're users have ever asked your script to email their reports in separate attachments instead of tar'ring them into one file, then you can use this. You'll need the mailx package of course. In Unix you'd want to add an additional parameter "-m" (uuencode foo.txt foo.txt; uuencode /etc/passwd passwd.txt)|mailx -m -s "Hooosa!"

Install pip with Proxy
Installs pip packages defining a proxy

Given $PID, print all child processes on stdout

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.


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: