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

Prettify XML in pipeline
xmllint2 comes with GNU libxml2 library. (based on: http://vim.wikia.com/wiki/Format_your_xml_document_using_xmllint)

Copy/move a bunch of files to dot files and back

Show a Package Version on Debian based distribution
if you don't want to show string "version?, then use awk or cut filter it: apt-cache show pkgname | grep -i "version:" | awk '{ print $2 }' we can also use regex to search many packages and show their versions: apt-cache search pkgregex | grep -i "version:"

Debug bash shell scripts.
Display commands and their arguments as they are executed. Useful for debugging shell scripts.

Copy your SSH public key on a remote machine for passwordless login.
Should run on any system with ssh installed.

Ultimate current directory usage command
Based on the MrMerry one, just add some visuals to differentiate files and directories

print line and execute it in BASH
!# is the currennt line so far, by using !#:- you can go from the second arg (it's zero indexed) to the last ($) (did I understand the problem correctly?)

Download a file and uncompress it while it downloads
This will uncompress the file while it's being downloaded which makes it much faster

awk date convert
Convert readable date/time with `date` command

Size(k) of directories(Biggest first)
somewhat faster version to see the size of our directories. Size will be in Kilo Bytes. to view smallest first change '-k1nr' to '-k1n'.


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: