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

calulate established tcp connection of local machine
If you want prepend/append text just wrap in echo: $echo Connected: `netstat -an|grep -ci "tcp.*established"`

lotto generator

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

Dump root ext3 fs over ssh
...can do similar w/ tar, dd, xfsdump, e2fsdump, etc.

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

Unencrypted voicechat
Sends the microphone input from PC1 to the speakers of PC2. Do the same in reverse to have an actual conversation ;) ... maybe with another port tough

Find all files that have nasty names
Get a list of file names that may cause problems (eg being served on a webserver, typing a URL on a mobile, etc)

Remove color codes (special characters) with sed

Create a backup of the file.
It will create a backup of the filename. The advantage is that if you list the folder the backups will be sorted by date. The command works on any unix in bash.

Show current working directory of a process


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: