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

Customer Friendly free
makes more sense to customers XD

Remove a line in a text file. Useful to fix
In this case it's better do to use the dedicated tool

convert pdf into multiple png files
syntax for resolution is: (see "man gs" for further informations) -rnumber -rnumber1xnumber2

Create a transition between two videos
We take the first 50 frames of a.mp4 for track a, and 24 blank frames followed by b.mp4 for track b. We then create a transition from track a to track b starting from frame 25 and ending at frame 49. The output is stored in out.mp4 To view the results without saving remove "-consumer avformat:out.mp4" from the end. Documentation of the mlt framework and the melt command can be found here: http://www.mltframework.org/bin/view/MLT/Documentation

list current processes writing to hard drive

pretend to be busy in office to enjoy a cup of coffee
using seq inside a subshell instead of a bash sequence to create increments.

Kill any process with one command using program name
This will kill all. e.g. killall firefox

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

Command line calculator
This opens a python command line. You can use math and random and float-division is enabled (without appending .0 to integers). I just don't know how to specify a standard precision.

Find out which process uses an old lib and needs a restart after a system update
Shows the full output of lsof.


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: