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

find directory with most inodes/files
Find which directory in one filesystem that contains most inodes or files.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Use Linux coding style in C program
put "-linux" option into $HOME/.indent.pro to make it default

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Get your public ip

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

Delete backward from cursor, useful when you enter the wrong password

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

modify a file in place with perl
changes THIS to THAT in all files matching fileglob* without using secondary files

Signals list by NUMBER and NAME
This command seems to achieve the similar/same goal.


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: