Commands by fibo (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

MySQL dump restore with progress bar and ETA
Display a progress bar while restoring a MySQL dump.

add all files not under version control to repository
With the force options the same results can be achieved

Unixtime
displays time in seconds since January 1, 1970 UTC

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

Cleanup Docker
# Delete all containers docker rm $(docker ps -a -q) # Delete all images docker rmi $(docker images -q)

print all characters of a file using hexdump
'od -c' works like 'hexdump -c' but is available on other operating systems that don't ship with hexdump (e.g. solaris).

Count occurrences per minute in a log file
The cut should match the relevant timestamp part of the logfile, the uniq will count the number of occurrences during this time interval.

alias to close terminal with :q
Put this in your ~/.bashrc file (or the equivalent) If you use vim a lot, this alias will be immediately obvious. Your brain will thank you.

a function to find the fastest DNS server
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.

Find files of two different extensions and copy them to a directory


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: