These are some sort of notes to myself, this list will be constantly updated.
Sort directories by size (human readable size):
| # du --max-depth=1 -h |sort -hr
|
Set tabsize to 4 in vim:
Show failed login attempts on your machine:
Print the most recent login of all users and of a given user:
| # lastlog
lastlog -u USERNAME
|
| $ curl -d "param1=value1¶m2=value2" http://example.com/
$ curl -X POST -d @static http://example.com/
|
Return current SSID
| iwconfig wlan0 | awk -F':' '/ ESSID/ {print $2}' | tr -d '"'
|
Force a reboot:
| # echo 1 > /proc/sys/kernel/sysrq
# echo b > /proc/sysrq-trigger
|
Force a shutdown:
| # echo 1 > /proc/sys/kernel/sysrq
# echo o > /proc/sysrq-trigger
|
| find . -maxdepth 1 -type d -exec basename {} \;|xargs -L 1 -I '{}' chown {}:{} {}
|
Print text at LINE_NUMBER in a huge file
| awk 'NR >= LINE_NUMBER && NR <= LINE_NUMBER' data.txt
|
Go Top