Commands using printf (206)

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 one page pdf to 90 Degrees Clockwise
This can be taken from the pdftk docs http://www.pdflabs.com/docs/pdftk-man-page/ http://www.pdflabs.com/docs/pdftk-cli-examples/ , but the command examples are not simple.

find out how many days since given date
You can also do this for seconds, minutes, hours, etc... Can't use dates before the epoch, though.

Unlock more space form your hard drive
This command changes the reserved space for privileged process on '/dev/sda' to 1 per cent.

Change prompt to MS-DOS one (joke)
This one eliminates the additional backslash at the end (which is not necessary)

This will take the last two commands from bash_history and open your editor with the commands on separated lines

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

Btrfs: Find file names with checksum errors
Btrfs reports the inode numbers of files with failed checksums. Use `find` to lookup the file names of those inodes. The files may need to be deleted and replaced with backups.

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

dd with progress bar and statistics to gzipped image

Find the dates your debian/ubuntu packages were installed.
Find when debian packages were installed on a system.


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: