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

Parse m3u playlist file for total time
Parse an m3u file with seconds for each item and output the length of the entire playlist

removing syncronization problems between audio and video
This assumes that there is a 10.2 sec delay between the video and the audio (delayed). To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie

Create multiple subfolders in one command.
Instead of typing separate commands to create various subfolders, we can create multiple subfolders by listing them between brackets and separated by commas.

Monitor Linux/MD RAID Rebuild

Get a BOFH excuse
Almost same output with fewer typing... OP had a great idea : BOFH !!!

Find where a kind of file is stored
In this case searches for where .desktop files are stored. The resulted is a sorted list of the top directories containing such files.

Multiple variable assignments from command output in BASH
No command substitution but subshell redirection

list files recursively by size

Date shows dates at other times/dates
Use date to find the date at other days and times.

Blank/erase a DVD-RW


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: