Commands tagged disk quota (2)

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

Screenshot pipe to remote host, adding URL to clipboard, notifying when done. (without saving locally)
Requires you to have password free login to remote host ;) Requires xclip and notify-send (If you want to put into clipboard and be notified when action is completed). DATE=$(date +%Y-%m-%d_%H-%M-%S)-$(($(date +%N)/10000000)); HOST="ssh host of your choice"; DEST="destination folder without trailing slash"; URL="URL for file if uploaded to web enabled dir ie. http://$HOST/~user/screenshot_$DATE.png"; import -window root png:- | ssh $HOST "cat > $DEST/screenshot_$DATE.png"; echo $URL | xclip; notify-send -u low "Screenshot Taken" "Entire screen.\nCopied to clipboard"

Pipe the result of a command to IRC (channel or query)
$ command | my_irc Pipe whatever you want to this function, it will, if everything goes well, be redirected to a channel or a user on an IRC server. Please note that : - I am not responsible of flood excesses you might provoke. - that function does not reply to PINGs from the server. That's the reason why I first write in a temporary file. Indeed, I don't want to wait for inputs while being connected to the server. However, according to the configuration of the server and the length of your file, you may timeout before finishing. - Concerning the server, the variable content must be on the form " 6667" (or any other port). If you want to make some tests, you can also create a fake IRC server on "localhost 55555" by using $ netcat -l -p 55555 - Concerning the target, you can choose a channel (beginning with a '#' like "#chan") or a user (like "user") - The other variables have obvious names.

STAT Function showing ALL info, stat options, and descriptions
This shows every bit of information that stat can get for any file, dir, fifo, etc. It's great because it also shows the format and explains it for each format option. If you just want stat help, create this handy alias 'stath' to display all format options with explanations. $ alias stath="stat --h|sed '/Th/,/NO/!d;/%/!d'" To display on 2 lines: $ ( F=/etc/screenrc N=c IFS=$'\n'; for L in $(sed 's/%Z./%Z\n/'

sends a postscript file to a postscript printer using netcat

The scene in the Shining (Stanley Kubrick)
Let's take a rest. How about watch a horror? The Shining

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"

suspend to ram without root
$dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Get your external IP address ( 10 characters long )
Shortest url to a external IP-service, 10 characters.

Calculate the distance between two geographic coordinates points (latitude longitude)
The Haversine formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes.

Search for a string inside all files in the current directory
Searches all files,dirs (also hidden) recursively

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: