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

For Gentoo users : helping with USE / emerge
This command puts all the flags of the USE variable actually used by the packages you emerged to the file "use", and those which are unused but available to the file "notuse"

Make vim open in tabs by default (save to .profile)
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.

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

Make sudo forget password instantly
By default sudo 'remembers' password for a few minutes, so that you do not need to re-enter password for a series of sudo commands that might follow within a short time duration. However, sometime you might want sudo to instantly 'forget' the password. (Next sudo command will need you to reenter the password) Credit: I first learned this while listening to one of the 'tuxradar' podcast.

Tells you where a command is in your $PATH, but also wether it's a link and to what.
You may also use the $(which foo) variant instead of backticks. I personnaly have an alias ll='ls -l'.

umount --rbind mount with submounts
Original: https://bugzilla.redhat.com/show_bug.cgi?id=194342

Create a backup of the file.
It will create a backup of the filename. The advantage is that if you list the folder the backups will be sorted by date. The command works on any unix in bash.

Make directories for and mount all iso files in a folder

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

SVN Command line branch merge
This will merge all of the changes from {rev_num} to head on the branch to the current working directory


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: