Advertisement
thantzinz

CentOS

Oct 23rd, 2016 (edited)
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.84 KB | None | 0 0
  1. yum install deltarpm (for slow connection ; please first install that rpm)
  2. tcpdump net-tools lsof wget curl telnet nmap rsync ntp iptables-ser\* sysstat vim-enhan\* wireshark traceroute iotop mailx unzip bind-utils epel-rele\* lsync\* httpd-tools\* vnstat\* yum-plugin-verify rng-tools ssldump sshuttle lrzsz strace pip glances tree multitail
  3.  
  4. top -p `pidof sshd|sed 's/\s/,/g'`
  5. top -p `pgrep -d, -f pl$` ( find perl scripts in f5 )
  6. top -p `pgrep -f myscript.php`
  7. ps -fp $(pgrep -d, -f pid)
  8.  
  9. grep -m1 root /etc/passwd
  10. Ctrl+S (XOFF)
  11. Ctrl+Q (XON)
  12.  
  13.  
  14. ls -d */
  15. find /etc -type f -name \* -size 0
  16.  
  17.  
  18. timedatectl set-timezone Asia/Rangoon
  19. hostnamectl set-hostname
  20. nmtui edit ens160
  21. nmcli con add con-name ens160 ifname ens160 type ethernet ip4 192.168.241.23/24 gw4 192.168.241.1
  22. yum install epel\*
  23. yum erase rsyslog
  24. yum install epel-release
  25. yum repolist
  26. yum check-update
  27.  
  28. #####################################################
  29. netstat -lnp -A inet
  30. openssl s_client -connect exmaple.com:443 |openssl x509 -noout -dates
  31. openssl s_client -connect exmaple.com:443 |openssl x509 -text
  32. cat testtext.txt |awk '{if($1 =="#"){print $0} else {print $5,$6}}'
  33. gpg --list-keys
  34. gpg --list-secret-keys
  35. gpg -d <filename.gpg> (If there are multiple keys, it will automatically choose the correct one.)
  36. ################
  37. lvs
  38. df -h
  39. df -i
  40. find /shared/ -xdev -type f -exec du {} \; | sort -rn | head -20
  41. find /var -type f -size +100M -exec ls -lh {} \;
  42. dd if=/dev/zero of=10mbfile bs=1MB count=10
  43. :Ex - open in current window
  44. :Vex - opens a new vertical window
  45. :Sex - open a new horizinal window
  46. netstat -lnp -A inet
  47. test f5 direcotry
  48. http://stackoverflow.com/questions/12120935/wget-output-document-and-headers-to-stdout
  49. http://blog.mailgun.com/25-465-587-what-port-should-i-use/
  50. echo -ne "OXYugGKg207g5uN/07V" | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement