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

check open ports without netstat or lsof

Backup with versioning
Apart from an exact copy of your recent contents, also keep all earlier versions of files and folders that were modified or deleted. Inspired by EVACopy http://evacopy.sourceforge.net

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

Disco lights in the terminal
Looks best in an 80x24 256-color terminal emulator.

Rename all files in lower case
rename is a really powerfull to, as its name suggests, rename files

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

tee to a file descriptor
the tee command does fine with file names, but not so much with file descriptors, such as &2 (stderr). This uses process redirection to tee to the specified descriptor. In the sample output, it's being used to tee to stderr, which is connected with the terminal, and to wc -l, which is also outputting to the terminal. The result is the output of bash --version followed by the linecount

Shows what processes need to be restarted after system upgrade
This command can be installed in debian by the package debian-goodies. It also outputs the /etc/init.d/ commands that you need to do.

finding more large files

Execute a command at a given time


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: