Commands by milmazz (1)

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

Pulls total current memory usage, including SWAP being used, by all active processes.

Find the package that installed a command

find all non-html files

Change/Modify timestamp interactively

Number of CPU's in a system
/proc/cpuinfo contains information about the CPU. Search for "processor" in the /proc/cpuinfo file wc -l, counts the number of lines.

use wget to check if a remote file exists

Remove all files but one starting with a letter(s)
Remove everything in current directory except files starting with "ca".

Print all lines in a file that are not a certain length
Alternatively, print all the lines that are a certain length: $awk 'length($0)==12 {print}' your_file_name

Stop and continue processing on a terminal
This will send the ASCII sequence for DC3 to the currently running tty which results in SIGSTOP (19). You can continue with ASCII sequence for DC1 by pressing CTRL+q which results in SIGCONT (18).

Generate the CPU utilization report
Generated the CPU utilization stats with 5 lines /every 2 seconds. Needs sysstat package to be installed prior to use sar.


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: