Commands by opertinicy (3)

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

Top 10 Memory Processes
It displays the top 10 processes sorted by memory usage

Detect encoding of a text file
This command gives you the charset of a text file, which would be handy if you have no idea of the encoding.

Join lines
It's works only when you replace '\n' to ONE character.

Get lines count of a list of files
This command gives you the number of lines of every file in the folder and its subfolders matching the search options specified in the find command. It also gives the total amount of lines of these files. The combination of print0 and files0-from options makes the whole command simple and efficient.

Recall “N”th command from your BASH history without executing it.

Show 'Hardware path'-style tree of all devices in Linux

Suppress output of loud commands you don't want to hear from

BASH: Print shell variable into AWK
Alternatively: export MyVAR=84; awk '{ print ENVIRON["MyVAR"] }'

Decrypt MD5
Decrypt MD5 , replace 1cb251ec0d568de6a929b520c4aed8d1 with the MD5 string you want to decrypt

Command to keep an SSH connection open
This runs the uptime command every 30 seconds to avoid an SSH connection dropping due to inactivity. Granted there are better ways of solving this problem but this is sometimes the right tool for the job.


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: