Commands using grep (1,935)

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

Oneliner to get domain names list of all existing domain names (from wikipedia)
Quietly get a webpage from wikipedia: curl -s By default, don't output anything: sed -n Search for interesting lines: /<tr valign="top">/ With the matching lines: {} Search and replace any html tags: s/<[^>]*>//g Finally print the result: p

Extract track 9 from a CD
Using mplayer to extract audio file from a CD

This command provides more color variety for the rainbow-like appearance by generating random color codes from 16 to 231 for adb logcat.

Console clock
Shows a simple clock in the console -t param removes the watch header Ctrl-c to exit

list all file extensions in a directory
Works on current directory, with built-in sorting.

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

need ascii art pictures for you readme text ?
Require boxes and / or cowsay packages. After input boxes -d dog , type your text and then press ctrl + d . Same goes for cowsay .

parse html/stdin with lynx
strips html from stdin

Record camera's output to a avi file
video.avi is the resulting file. Press Ctrl+c to stop the recording. You can change the OVC option to another to record into a different format.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.


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: