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

Convert mkv to SVCD/DivX
ffmpeg supports mkv

Test a SSLv2 connection
Test for weak SSL version.

Show errors in the kernel ring buffer
Much more useful then parsing syslog

Get all shellcode on binary file from objdump
Tired copy paste to get opcode from objdump huh ? Get more @ http://gunslingerc0de.wordpress.com

Produce a pseudo random password with given length in base 64
Of course you will have to install Digest::SHA and perl before this will work :) Maximum length is 43 for SHA256. If you need more, use SHA512 or the hexadecimal form: sha256_hex()

Show memory usage of all docker / lxc containers

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

umount --rbind mount with submounts
Original: https://bugzilla.redhat.com/show_bug.cgi?id=194342

Alias to securely run X from tty and close that tty afterwards.
There are different ways to run X, I prefer to run it without xdm/gdm. The problem is you can't lock X because one can press Ctrl+Alt+F1, press Ctrl+Z and kill you X locking process. Of course you can disable Ctrl+Alt* or Ctrl+Alt+Backspace keys, but it's inconvinient if you really need to switch into console.

Simple colourized JSON formatting for BASH
Leave out pygmentize or `pip install pygments` first.


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: