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

Suspend to ram
Using sys

Download all manuals RedHat 7 (CentOS/Fedora) with one command in Linux

reverse order of file
awk reverse order of lines (emulates "tac")

Compare a remote dir with a local dir
You can compare directories on two different remote hosts as well: $ diff -y

Sort on multiple dis-contiguous keys/fields (can even specify key number/field from the end)
Notes: 1) -n-1 means sort key is the last field 2) -l is important if each separate record is on a new line (usually so for text files) 3) -j tells msort not to create log file (msort.log) in the working directory 4) may need to install msort package. 5) msort does lot more. Check man msort

backup delicious bookmarks
Useful script to backup all your delicious bookmarks. With decilicious shutting down soon , it could be useful

Find all files that have nasty names
Get a list of file names that may cause problems (eg being served on a webserver, typing a URL on a mobile, etc)

Test file system type before further commands execution
Exclude 400 client hosts with NFS auto-mounted home directories. Easily modified for inclusion in your scripts.

run complex remote shell cmds over ssh, without escaping quotes
It executes commands as arguments to ssh, avoiding problematic shell expansions, without the need of writing the commands in question to a temporary file, just reading them from STDIN.

Remove all unused kernels with apt-get
TIMTOWTDI


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: