# resources
ps -eo size,rss,pid,user,comm --sort -rss | head -n 30
ps -eo size,rss,pcpu,pid,user,comm --sort -pcpu | head -n 30
# memstat
atop -L160 1 1 | grep MEM
# caches
# chmod directories
# awk epoch to timestamp in logs
awk '{a = strftime("%F %T", $1); $1 = "" ; print a" "$0}'
# safe file delete
# some magic in resolv.conf
# default browser ( set default apps )
xdg-mime default firefox.desktop x-scheme-handler/http
xdg-mime default firefox.desktop x-scheme-handler/https
# keyboard
setxkbmap -layout us,ru -option grp:toggle
# qt crutch
export QT_GRAPHICSSYSTEM=native | raster | opengl
# swap usage by pid
# sqlite
# get url
wget -qO- http://foo/response
wget -qO- http://bar/api/json/response | python -m json.tool
wget -qO- http://bar/api/json/response | jq
wget -qO- http://bar/api/json/response | jq '.[] | select((.k_1 == 1) or (.k_2 == 2)) | "k1:\(.k_1) k2:\(.k_2)"'
# ssh/sshfs
sshfs -o reconnect -o auto_unmount 192.168.5.5:/mnt/data/usorted/ ~/sshfs/unsorted/
No comments:
Post a Comment