Check These Out
Display the amount of memory used by all the httpd processes. Great in case you are being Slashdoted!
Shows all block devices in a tree with descruptions of what they are.
Simple and easy to remember. -h is human, -d1 = depth 1.
disk usage, human, depth 1
-vn removes tha video content, the copy option tells ffmpeg to use the same codec for generating the output
Converts control codes and spaces (ASCII code ≤ 32) to visible Unicode Control Pictures, U+2400 ? U+2420. Skips \n characters, which is probably a good thing.
Fool date by setting the timezone out by 24 hours and you get yesterday's date. Try TZ=XYZ-24 to get tomorrow's date. I live in TZ=GMT0BST so you might need to shift the number 24 by the hours in your timezone.
Replace 'csv_file.csv' with your filename.
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials
Turns out smacie.com has a text file containing every single one of the borat quotes, each one on a newline. This makes it very convenient, as this can be done without any sed-parsing, and uses less bandwitdth!
Note that borate quotes are quite offensive, much more so than "fortunes-off"!
This causes cp to detect and omit large blocks of nulls. Sparse files are useful for implying a lot of disk space without actually having to write it all out.
http://en.wikipedia.org/wiki/Sparse_file
You can use it in a pipe too:
$ dd if=/dev/zero bs=1M count=5 |cp --sparse=always /dev/stdin SPARSE_FILE