Commands using sed (1,319)

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

Enter your ssh password one last time
Enter your ssh public key in the remote end for future key-based authentication. Just type your password one last time. The next time you should be able to login with the public key. If you don't have a key, generate one with ssh-keygen. Requires Bourne-compatible shell in the remote end.

Figure out what shell you're running

Search commandlinefu from the CLI
html2text: http://www.mbayer.de/html2text/

repeat any string or char n times without spaces between
(here is character '+' repeated 80 times) Sometimes needed to enhance the title of the script.

Stop procrastination on Facebook.com
or echo '127.0.0.1 facebook.com' | sudo tee -a /etc/hosts Do not execute this command if you don't know what you are doing.

Purge configuration files of removed packages on debian based systems
also search with aptitude search '~c'

Delete all but the latest 5 files
yes 6 (tail from 6th line)

which program is this port belongs to ?
Sometimes you need to use a port that is already opened by some program , and you don't know who to "kill" for it to release - so, now you do !

list block devices
Shows all block devices in a tree with descruptions of what they are.

Check executable shared library usage
provides list of shared libraries required by executable


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: