Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
project:linuxfun [2016/04/25 03:58]
over23
project:linuxfun [2017/09/19 11:41] (current)
over23
Line 1: Line 1:
-{{project:siroky_vtip.jpg}}+{{ project:sorry_vole_error.gif}} 
 + 
 +  * LINUX BASICS Public Wiki by Over and LiPo: [[http://​wiki.li-on.cz/​|http://​wiki.li-on.cz/​]] 
 + 
 +  * 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|https://​over23.github.io/​r00t_l4b/​useful_linux.html]] 
 + 
 +===== test machine and scripts ===== 
 +[[test questions]] 
 + 
 +[[broken machine]] 
 + 
 +===== parse IRC logs only for http - example ===== 
 <​code>​ <​code>​
-$ cat pismenka1.txt | iconv -f utf8 -t ascii//TRANSLIT//IGNO                                                                                       ​RE ​ascii.txt+  grep -A 2 http ~/irclogs/freenode/#labka.log | uniq | grep -v -e "​-!-"​~/​grep_irssi_http2.txt
 </​code>​ </​code>​
-  * transform Czech and other diacritics to pure ascii+ 
 +===== transform Czech and other diacritics to pure ascii =====
  
 <​code>​ <​code>​
-echo "​whatever" ​rev+cat pismenka1.txt ​iconv -f utf8 -t ascii//​TRANSLIT//​IGNO ​                                                                                      ​RE>​ ascii.txt
 </​code>​ </​code>​
-  *result: ​revetahw+ 
 +===== invert text to reverse [whatever = revetahw] =====
  
 <​code>​ <​code>​
-curl -u tpetru@gmail.com --silent ​"https://​mail.google.com/​mail/​feed/​atom" | perl -ne 'print "​\t"​ if /<name>/; print "​$2\n"​ if /<​(title|name)>(.*)<​\/​\1>/;'​ > ~/tmp+$ echo "whatever" | rev 
 +</code>
  
-Enter host password for user '​tpetru@gmail.com':​ +===== get me emails from gmail - fokin dangerous!!! =====
- Gmail - Inbox for tpetru@gmail.com</​title><​tagline>​New messages in your Gmail Inbox</​tagline><​fullcount>​3</​fullcount><​link rel="​alternate"​ href="​https://​mail.google.com/​mail"​ type="​text/​html"​ /><​modified>​2016-04-25T01:​48:​53Z</​modified><​entry><​title>​Tomas,​ discover eBay!</​title><​summary>​Find all your favorites for less View this message in your browser. Fashion Electronics Home &​amp;</​summary><​link rel="​alternate"​ href="​https://​mail.google.com/​mail?​account_id=tpetru@gmail.com&​amp;​message_id=15447efa344aaff3&​amp;​view=conv&​amp;​extsrc=atom"​ type="​text/​html"​ /><​modified>​2016-04-24T11:​02:​47Z</​modified><​issued>​2016-04-24T11:​02:​47Z</​issued><​id>​tag:​gmail.google.com,​2004:​1532489386297044979</​id><​author><​name>​eBay</​name><​email>​eBay@reply1.ebay.com</​email></​author></​entry><​entry><​title>​CTJB 2016 (1-4.9.2016) Vysocina</​title><​summary>​Caute hekreDalsi rocnik CTJB je tuBude sa konat 1.9.2016 - 4.9.2016 v malebnom prostredi Vysociny</​summary><​link rel="​alternate"​ href="​https://​mail.google.com/​mail?​account_id=tpetru@gmail.com&​amp;​message_id=154443bd1c8ece1e&​amp;​view=conv&​amp;​extsrc=atom"​ type="​text/​html"​ /><​modified>​2016-04-23T17:​47:​31Z</​modified><​issued>​2016-04-23T17:​47:​31Z</​issued><​id>​tag:​gmail.google.com,​2004:​1532424252719812126</​id><​author><​name>​Pavol Rusnak</​name><​email>​stick@gk2.sk</​email></​author></​entry><​entry><​title>​public ip+
  
-cat ~/tmp | awk -v FS="​(<​fullcount>​|</​fullcount>​)"​ '​{print $2}'+<​code>​ 
 +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}'
 </​code>​ </​code>​
 +
   * get me emails from gmail   * get me emails from gmail
   * parse only number of new emails there   * parse only number of new emails there
 +
 +===== used swap space =====
 +
 +<​code>​
 +for file in /​proc/​*/​status ; do awk '/​VmSwap|Name/​{printf $2" " $3}END{print ""​}'​ $file; done | sort -k 2 -n -r | less
 +</​code>​
 +
 +===== change fish to bash =====
 +
 +<​code>​
 +usermod -s /​usr/​bin/​fish username
 +</​code>​
  
 ====== Tools ====== ====== Tools ======
 +
   * nikto   * nikto
   * sqlmap   * sqlmap
-  * https://​www.owasp.org/​index.php/​ZAP+  * [[https://​www.owasp.org/​index.php/​ZAP|https://​www.owasp.org/​index.php/​ZAP]] 
 + 
 +  * 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 }'` 
 + 
 +====== OpenVPN ====== 
 + 
 +  * [[https://​www.howtoforge.com/​tutorial/​how-to-install-openvpn-on-centos-7/​|https://​www.howtoforge.com/​tutorial/​how-to-install-openvpn-on-centos-7/​]] 
 + 
 +{{  :​project:​siroky_vtip.jpg?​800}} 
 + 
 +====== FFMPEG convert script ====== 
 +  #!/bin/bash -x 
 +  for f in *.mp4 
 +  do 
 +    soubor="/​Users/​pavouk/​Movies/​xxx/​$f"​ 
 +    soubor2="/​Users/​pavouk/​Movies/​xxx_h265/​$f"​ 
 +    /​usr/​local/​bin/​ffmpeg -i ${soubor} -c:v libx265 -preset medium -codec:a aac -strict experimental -b:a 128k ${soubor2} 
 +  done 
 + 
 +====== Get a rid of spaces in dir ====== 
 +  for f in *\ *; do mv "​$f"​ "${f// /_}"; done
  
  • project/linuxfun.1461549487.txt.gz
  • Last modified: 2016/04/25 03:58
  • by over23