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

Turns red the stderr output
Reference: http://stackoverflow.com/a/4455706

Get IPv4 of eth0 for use with scripts
Combines wgzhao's grep | awk | sed into one awk command.

Insert a line at the top of a text file without sed or awk or bash loops
Yet another way to add a line at the top a of text file with the help of the tac command (reverse cat).

Change pidgin status
Thanks for the comment oshazard, i wasn't aware of purple-remote existence.

Disable beep sound from your computer
This command will disable the beep sound from the PC speaker.

Copy files based on extension with recursive and keeping directory structure
Copy file theo phần mở rộng c? đệ quy v? giữ nguy?n cấu tr?c thư mục Replace "jar" by extension which you need.

find out which directories in /home have the most files currently open

Search and replace in multiple files recursively
Replace "foo" with "bar" in all files in current directory recursively

automount samba shares as devices in /mnt/
the middle command between the ; and ; is the vi commands that insert that line into the last line of the file, the esc with the carets is literally hitting the escape key, you have to have the smbfs package installed to do it, I use it to access my iTunes music on my mac from my linux PC's with amarok so I can play the music anywhere in the house. among other things, it allows you to access the files on that share from your computer anytime you're on that network.

Get MX records for a domain


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: