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

Find the package that installed a command

Insert the last argument of the previous command
for example if you did a: $ ls -la /bin/ls then $ ls !$ is equivalent to doing a $ ls /bin/ls

Live stream a remote audio device over ssh using only ffmpeg
Change parameter 'plughw:0,0' in accordance with your audio device. To learn 'plughw' option, type the command aplay -l.

Run local bash script on remote server
Run local scripts on remote server. "-T Disable pseudo-tty allocation"

Show what PID is listening on port 80 on Linux

Monitor system load and print out top offending processes
This checks the system load every second and if it's over a certain threshold (.8 in this example), it spits out the date, system loads and top 4 processes sorted by CPU. Additionally, the \a in the first echo creates an audible bell.

Create multiple subfolders in one command.
Instead of typing separate commands to create various subfolders, we can create multiple subfolders by listing them between brackets and separated by commas.

Record a screencast and convert it to an mpeg
Grab X11 input and create an MPEG at 25 fps with the resolution 800x600

Get the size of all the directories in current directory

This will take the last two commands from bash_history and open your editor with the commands on separated lines


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: