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

list files recursively by size

Get a docker container's run command line
A good way to build a new container when you don't remember how you did it the first time

Detect Language of a string
Usage: $ detectlanguage Example: $ detectlanguage hola

Stream (almost) any music track in mplayer
Just give it an artist and/or song at the end of the command as shown.

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

Graphical tree of sub-directories with files
The command finds every item within the directory and edits the output so that subdirectories are and files are output much like the tree command

Auto download Ubuntu 10.04 LTS with super fast zsync
Need to have rc iso pre-downloaded before running command.

locating packages held back, such as with "aptitude hold "
locating packages held back, such as with "aptitude hold "

Recursively grep thorugh directory for string in file.
-R, -r, --recursive Read all files under each directory, recursively; this is equivalent to the -d recurse option.

Wait for an already launched program to stop before starting a new command.
Referring to the original post, if you are using $! then that means the process is a child of the current shell, so you can just use `wait $!`. If you are trying to wait for a process created outside of the current shell, then the loop on `kill -0 $PID` is good; although, you can't get the exit status of the process.


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: