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

Re-read partition table on specified device without rebooting system (here /dev/sda).

List all NPM global packages installed

generate a telephone keypad
seems a useless command ...

Find the most recently changed files (recursively)

Get the 10 biggest files/folders for the current direcotry
This command simply outputs 10 files in human readable, that takes most space on your disk in current directory.

Convert from octal format to umask
Umask is obtained subtracting 7 from each cypher of octal format. I store octal perm format in an array,then for each element of array I subtract 7. The result is the umask.

LIST FILENAMES OF FILES CREATED TODAY IN CURRENT DIRECTORY
Then pipe to 'xargs ls' for a familiar listing, possibly using find's -print0 and xarg's -0 options.

Take a file as input (two columns data format) and sum values on the 2nd column for all lines that have the same value in 1st column
Example: $ cat

Encode file path to URL
Really helpfull when play with files having spaces an other bad name. Easy to store and access names and path in just a field while saving it in a file. This format (URL) is directly supported by nautilus and firefox (and other browsers)

One liner to kill a process when knowing only the port where the process is running
-k (kill option ) . To kill all processes accessing this port


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: