Commands using egrep (220)

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

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

sed /pat/!d without using sed (no RE; limited to shell patterns aka globbing)
POSIX requires this "string truncating" functionality. might as well use it, at least for very small tasks where invoking sed and using RE is overkill.

Spawn a retro style terminal emulator.
Just note that ctrl+shift+t to make new tabs will not work with . Pair it with a terminal multiplexer like for the best experience.

Batch Convert SVG to PNG (in parallel)
Use GNU Parallel: short, easy to read, and will run one job per core.

print a python-script (or any other code) with syntax-highlighting and no loss of indentation

(DEBIAN-BASED DISTROS) Find total installed size of packages given a search term
Replace \-dev with whatever you wanna search for

Restore user,group and mod of an entire website
I often use it at my work, on an ovh server with root ssh access and often have to change mod after having finished an operation. This command, replace the user, group and mod by the one required by apache to work.

Doing some floating point calculations with rounding (e.g. at the 3rd decimal)

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Fetch the current human population of Earth
They are using json now


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: