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

play high-res video files on a slow processor
Certain codecs in high res don't play so well on my Dell Mini 9. Using this command, I can play just about anything and it keeps the sound in sync to boot!

GRUB2: set Super Mario as startup tune
I'll let Slayer handle that. Raining Blood for your pleasure.

pipe commands from a textfile to a telnet-server with netcat
sends commands specified in $commandfile to the telnet-server specified by $telnetserver. to have newlines in $commandfile interpreted as ENTER, save the file in CR+LF (aka "Windows-Textfile") format. if you want to save the output in a separate file, use: $nc $telnetserver 23 < $commandfile > $resultfile

Count TCP States From Netstat
Counts TCP states from Netstat and displays in an ordered list.

Hide or show Desktop Icons on MacOS
Hides all Files and Folders on the MacOS Desktop. To show files and folders, type "true" instead of "false". "Finder" at the end is case sensitive, "finder" doesn’t work

check open ports without netstat or lsof

Deleting Files from svn which are missing

Undo mkdir -p new/directory/path
Removes all directories on given path, working from right to left, and stops when reaching a non-empty directory Counterpart of $ mkdir -p new/directory/path Shortcut (must be issues as next command immediately after mkdir): $ ^mk^rm ( see http://www.commandlinefu.com/commands/view/19/runs-previous-command-but-replacing )

Keep track of diff progress
When running a long `diff -r` over folders, this simulates a "verbose" mode where you can see where diff is in the tree. Replace $file with the first part of the path being compared.

Listing directory content of a directory with a lot of entries
Ever wanted to get the directory content with 'ls' or 'find' and had to wait minutes until something was printed? Perl to the rescue. The one-liner above(redirected to a file) took less than five seconds to run in a directory with more man 2 million files. One can adapt it to e.g. delete files that match a certain pattern.


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: