Commands using seq (94)

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

calculate in commandline with bash
Only works for integer arithmetic.

Copy sparse files
This causes cp to detect and omit large blocks of nulls. Sparse files are useful for implying a lot of disk space without actually having to write it all out. You can use it in a pipe too: $ dd if=/dev/zero bs=1M count=5 |cp --sparse=always /dev/stdin SPARSE_FILE

Create a simple video contact sheet using the vcs bash script
Assumes you've downloaded Toni Corvera's vcs script (, have it in your PATH, and have installed the script's dependencies. Generates a video contact sheet of 24 thumbnails and 3 thumbnails per column. The bold font and white-on-black color scheme keeps the text readable at the chosen 70% JPEG compression quality, which keeps the file size at a manageable level. You can go even lower with the quality and get a good looking result.

Get file access control list

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

Random Futurama quote
Random Futurama quote from Change the quote= to change the quote source.

list block devices
Shows all block devices in a tree with descruptions of what they are.

List only the directories

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" }

Print the current time on the whole screen, updated every second now also supports reading stdin continuously to update what it shows, different ?slides? separated by a form feed character. Here, we feed the current time into it each second to create a large clock.

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: