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

Rotate a single page PDF by 180 degrees
More pdftk examples: http://www.pdflabs.com/docs/pdftk-cli-examples/

pretend to be busy in office to enjoy a cup of coffee
Not as taxing on the CPU.

Delete files older than..
This command will delete files i a given path (/dir_name) , which older than given time in days (-mtime +5 will delete files older than five days.

coloured shell prompt
This coloured prompt will show: username in green, grey "@" sign, hostname in red, current directory in yellow, typed commands in green.

check open ports without netstat or lsof

Create a random file of a certain, and display progress along the way.
SIZE is the number of gigabytes and the file name is at the end. Random data is generated by encrypting /dev/zero, similar to other techniques posted on here.

Selecting a random file/folder of a folder
Also looks in subfolders

Query well known ports list
Uses the file located in /etc/services

Share your terminal session real-time
One person does `mkfifo foo; script -f foo' and another can supervise real-time what is being done using `cat foo'.

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


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: