Commands by pixelbeat (2)

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

Remove a range of lines from a file

tcpdump top 10 talkers
capture 2000 packets and print the top 10 talkers

shut of the screen ( Fool proof )
Use the command to create a script and bind it to a key using keyboard shortcut. eg: Script locks the screen in a loop until the command is executed again.At first it

Run a command that has been aliased without the alias
Most distributions alias cp to 'cp -i', which means when you attempt to copy into a directory that already contains the file, cp will prompt to overwrite. A great default to have, but when you mean to overwrite thousands of files, you don't want to sit there hitting [y] then [enter] thousands of times. Enter the backslash. It runs the command unaliased, so as in the example, cp will happily overwrite existing files much in the way mv works.

Increase mplayer maximum volume
use '0' and '9' to increase/decrease volume. this is useful on laptops with low speaker volume.

Ping all hosts on 192.168.1.0/24

Print a great grey scale demo !
Seen here: http://www.pixelbeat.org/docs/terminal_colours/

Print the 16 most recent RPM packages installed in newest to oldest order

Quickly analyze apache logs for top 25 most common IP addresses.
This command is much quicker than the alternative of "sort | uniq -c | sort -n".

Recursive search and replace (with bash only)
Replaces a string matching a pattern in one or several files found recursively in a particular folder.


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: