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

Rename files in batch

print indepth hardware info
wanna know something about your hardware? how about EVERYTHING?? then this should do ya well

list block devices
Shows all block devices in a tree with descruptions of what they are.

Translates a phrase from English to Portuguese
Translates a string from English to Portuguese by using google translator web service.

Find the process you are looking for minus the grepped one
Get the PID of a process by name

Swap a file or dir with quick resotre
This lets you replace a file or directory and quickly revert if something goes wrong. For example, the current version of a website's files are in public_html. Put a new version of the site in public_html~ and execute the command. The names are swapped. If anything goes wrong, execute it again (up arrow or !!).

Find out what package some command belongs to (on RPM systems)
Replace 'more' command with any command which is in your PATH.

Take screenshot through SSH
Of course it requires import command, from imagemagick tools, but it's simpler to type, and imagemagick is usefull anyway.

Convert files from DOS line endings to UNIX line endings
This method will also convert mac line endings.

Count lines in a file with grep
Returns the number of lines in a file, emulates "wc -l" behavior with grep.


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: