Commands by anvithatc (0)

  • bash: commands not found

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

Delete all empty lines from a file with vim

Colorizes an access log
Puts a splash of color in your access logs. IP addresses are gray, 200 and 304 are green, all 4xx errors are red. Works well with e.g. "colorize access_log | less -R" if you want to see your colors while paging. Use as inspiration for other things you might be tailing, like syslog or vmstat Usage: $ tail -f access.log | colorize

Read info(1) pages using 'less' instead of GNU Texinfo
I like man pages, and I like using `less(1)` as my pager. However, most GNU software keeps the manual in the 'GNU Texinfo' format, and I'm not a fan of the info(1) interface. Just give me less. This command will print out the info(1) pages, using the familiar interface of less!

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

find packages installed from e.g. sid which are newer than those available from e.g. testing when sid is no longer present as a source repo
This is useful if you add sid, install some packages, then remove sid and want to work out which packages you installed from sid that should be removed (e.g. before an upgrade to the new stable). Alternatively you can think of this as "find installed packages that can no longer be installed."

create tar archive of files in a directory and its sub-directories
creates a compressed tar archive of files in /path/foo and writes to a timestamped filename in /path.

Drop all tables from a database, without deleting it
Uses two comands, requieres mysqldump, but works as expected.

Print out a man page
man -t manpagename gives a postscript version of said man page. You then pipe it to ls, and assuming you have cups set up, it prints in your default printer.

Print only the odd lines of a file (GNU sed)
The tilde address operator is an extension of GNU sed. It won't work with POSIX sed.

32 bits or 64 bits?


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: