Commands by ant7 (1)

  • It works extremely fast, because it calculates md5sum only on the files that have the same size and name. But there is nothing for free - it won't find duplicates with the different names. Show Sample Output

    find -type f -printf '%20s\t%100f\t%p\n' | sort -n | uniq -Dw121 | awk -F'\t' '{print $3}' | xargs -d '\n' md5sum | uniq -Dw32 | cut -b 35- | xargs -d '\n' ls -lU
    ant7 · 2017-05-21 02:26:16 0

What's this? 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

See non printable caracters like tabulations, CRLF, LF line terminators ( colored )
For fancier and cleaner output, try the following snippet : $ showendlines(){ while read i; do od --address-radix=n --width=$(wc -c

check open ports without netstat or lsof

Execute a command at a given time
This is an alternative to cron which allows a one-off task to be scheduled for a certain time.

list files recursively by size

find files containing text
I find this format easier to read if your going through lots of files. This way you can open the file in any editor and easily review the file

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

Use default value if unassigned
Will use variable value (for variable $my_dir, in this case), an assign a default value if there is none.

Add all unversioned files to svn

Who has the most Apache connections.
This will tell you who has the most Apache connections by IP (replace IPHERE with the actual IP you wish to check). Or if you wish, remove | grep -c IPHERE for the full list.

Cut the first 'N' characters of a line
You can also cut charactes starting from X to N.

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.


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: