Commands tagged grep (409)

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

Mount and umount iso files
Add the functions to the .bashrc to make it work Example: First go to the iso file directory and type: ---------------------------------------------------------------------------------------------------- user@box:~$ miso file.iso ---------------------------------------------------------------------------------------------------- It will put you into a temporary mounting point directory (ISO_CD) and will show the files You can umount the iso file whatever the directory you are ---------------------------------------------------------------------------------------------------- user@box:~/ISO_CD$ uiso ---------------------------------------------------------------------------------------------------- It wil umount the iso file and remove the temporary directory in your home

Compress a file or directory keeping the owner and permissions

sed edit-in-place using -a option instead of -i option (no tmp file created)
does the -i option open a tmp file? this method does not.

Verbosely delete files matching specific name pattern, older than 15 days.

Replace all in last command

Remove all mail in Postfix mail queue.

Generate a random password 30 characters long
Find random strings within /dev/urandom. Using grep filter to just Alphanumeric characters, and then print the first 30 and remove all the line feeds.

A fun thing to do with ram is actually open it up and take a peek. This command will show you all the string (plain text) values in ram
cat? dd? RTFM

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Compute running average for a column of numbers
This is an on-line algorithm for calculating the mean value for numbers in a column. Also known as "running average" or "moving average".


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: