Commands by Wafelijzer (3)

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

Search for a line of text in a directory of files recursively (while limiting to certain file extensions)

Add prefix onto filenames
Best to try first with -n flag, to preview

Random IPv4 address

Backup files older than 1 day on /home/dir, gzip them, moving old file to a dated file.
Useful for backing up old files, custom logs, etc. via a cronjob.

List only directories, one per line

Short and sweet output from dig(1)
Turn off almost all of dig's output except for what you'd see in a zone file. This can also be put into ~/.digrc.

ANSI 256 Color Test
Terminal Color tester using python, works with py2 and 3

complete extraction of a debian-package
extracts the debian-package $debfile to $extractdir, including all packaging-information. to repack the package, just type: $dpkg-deb -b $extractdir

Get a docker container's run command line
A good way to build a new container when you don't remember how you did it the first time

Echo the latest commands from commandlinefu on the console
A Quick variation to the latest commands list with the new-lines skipped. This is faster to read.


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: