Commands by MattOates (1)

  • Log scaled histogram so that you can see large files even if there is a single HUGE file in the directory. Also makes sure the histogram is fullscreen for best chance of readable file names.


    0
    gnuplot -p <(echo "set terminal wxt size `xrandr|grep -P '\s{3}(\d+x\d+).*\+$'|tr -s ' ' '\t'|cut -f2|sort -n|tail -n1|tr 'x' ','`; set logscale y; set style data hist; set xtic rot by -90; plot '<(stat -c \"%n %s\" *)' u 2:xtic(1)")
    MattOates · 2011-11-30 15:14:40 0

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

Alert on Mac when server is up
When run on a mac, this command will bring up a dialog box in the Terminal when server HOSTNAME first responds to a ping.

Outputs files with ascii art in the intended form.
Files containing ascii art (e.g. with .nfo extension) are typically not correctly reproduced at the command line when using cat. With iconv one can easily write a wrapper to solve this: $ #!/bin/bash $ if [ -z "$@" ]; then echo "Usage: $(basename $0) file [file] ..." $ else iconv -f437 -tutf8 "$@"; fi $ exit 0

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Convert unix timestamp to date

recursively remove BOM

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Disable system bell in an X session
Execute this command in a terminal to disable the system-bell during X-session lifetime.

reverse order of file

Clone all repos from a user with lynx
https://wuseman.github.io/wcloner/

Search through files, ignoring .svn


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: