This is an old revision of the document!


siroky_vtip.jpg

  • A lot of interesting and useful commands and info for Linux machine [BASH positive] - to be rewritten to Doc:

https://over23.github.io/r00t_l4b/useful_linux.html

$ cat pismenka1.txt | iconv -f utf8 -t ascii//TRANSLIT//IGNO                                                                                       RE > ascii.txt
  • transform Czech and other diacritics to pure ascii
$ echo "whatever" | rev
  • result: revetahw
curl -u "email":"passwd" --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if /<name>/; print "$2\n" if /<(title|name)>(.*)<\/\1>/;' | awk -v FS="(<fullcount>|</fullcount>)" '{print $2}'
  • get me emails from gmail
  • parse only number of new emails there
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2" " $3}END{print ""}' $file; done | sort -k 2 -n -r | less
  • parsuje used swap space

* exchange fish to bash

usermod -s /usr/bin/fish username

Tools

  • files over 50Megs

find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 “: ” $5 }'

  • find and kill some running process

kill `ps aux | grep -F 'myServer' | grep -v -F 'grep' | awk '{ print $2 }'`

  • project/linuxfun.1479109775.txt.gz
  • Last modified: 2016/11/14 08:49
  • by over23