All commands (14,187)

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

youtube2m3u
generate playlists from youtube ( or othre things that support yt-dlp)

Convert text to uppercase
Usage: upper [STRING]...

Show directories in the PATH, one per line
This version uses Pipes, but is easier for the common user to grasp... instead of using sed or some other more complicated method, it uses the tr command

Create a new file

tail: watch a filelog
-f file(s) to be monitorized -n number of last line to be printed on the screen in this example, the content of two files are displayed

Add a progress counter to loop (see sample output)
For this hack you need following function: $ finit() { count=$#; current=1; for i in "$@" ; do echo $current $count; echo $i; current=$((current + 1)); done; } and alias: $ alias fnext='read cur total && echo -n "[$cur/$total] " && read' Inspired by CMake progress counters.

Convert seconds into minutes and seconds
This is a very simple way to input a large number of seconds and get a more useful value in minutes and seconds. Avoids useless use of echo.

list files recursively by size

parrallel execution of a command on remote hosts by ssh or rsh or ...
parrallel execution of a command on remote host by ssh or rsh or ... very useful for cluster management (software update)

Lurk what's going on on remote console


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: