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 newbies, how to get one line info about all /bin programs
Get simple description on each file from /bin dir, in list form, usefull for newbies.

Show linux kernel modules dependencies
Use modprobe to list all the dependencies of a certain kernel module. Handy when debugging system issues.

Isolate file name from full path/find output
Quick method of isolating filenames from a full path using expansion. Much quicker than using "basename"

List the size (in human readable form) of all sub folders from the current location
Simple and easy to remember. -h is human, -d1 = depth 1. disk usage, human, depth 1

Load file into RAM (cache) for faster accessing for repeated usage
Best result when file size less than half of RAM size

Sort the size usage of a directory tree by gigabytes, kilobytes, megabytes, then bytes.
Since coreutils 7.6 provides sort -h

Write comments to your history.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.

Analyze, check, auto-repair and optimize Mysql Database
A useful way to do a full check and auto repair damaged databases

slow down CPU and IO for process and its offsprings.

Use a decoy while scanning ports to avoid getting caught by the sys admin :9
Scan for open ports on the target device/computer (192.168.0.10) while setting up a decoy address (192.168.0.2). This will show the decoy ip address instead of your ip in targets security logs. Decoy address needs to be alive. Check the targets security log at /var/log/secure to make sure it worked.


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: