Bilindiği üzere linuxde yardım almak için birçok komut kullanılabilir. Örneğin ‘komut’ için yardım istediğimizde man komut, komut — help, whereis komut veya whatis komut kullanılabilir.
Fakat aranan bilgi genellikle kısadır ve gereksiz bilgileri süzmek zaman kaybına yol açmaktadır.
Bu kadar fazla yardım mekanizması olmasına rağmen benim tanıdığım bütün sistem yöneticileri Google abiye de sormaktadır.
“cheat” komutu sayesinde daha az Google yapabileceğimizi düşünüyorum.
cheat’i kurmak için python ve pip kurulu olmalıdır. Cheat’i git klonlayarak kullanacağımız için git’i de kuralım.
# yum install python # yum install python-pip # yum install git
Şimdi ihtiyaç duyulan python bağımlılıklarını kuralım
# pip install docopt pygments
Herhangi bir bağımlılığımız kalmadı. Şimdi git deposunu klonlayabilir ve kurulumu yapabiliriz.
# git clone https://github.com/chrisallenlane/cheat.git # cd cheat # python setup.py install
cheat kurulumu tamamlandı. Şimdi kullanalım:
[root@zinnetb bash_completion.d]# cheat dd # Read from {/dev/urandom} 2*512 Bytes and put it into {/tmp/test.txt} # Note: At the first iteration, we read 512 Bytes. # Note: At the second iteration, we read 512 Bytes. dd if=/dev/urandom of=/tmp/test.txt count=512 bs=2 # Watch the progress of 'dd' dd if=/dev/zero of=/dev/null bs=4KB &; export dd_pid=`pgrep '^dd'`; while [[ -d /proc/$dd_pid ]]; do kill -USR1 $dd_pid && sleep 1 && clear; done # Watch the progress of 'dd' with `pv` and `dialog` (apt-get install pv dialog) (pv -n /dev/zero | dd of=/dev/null bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0 # Watch the progress of 'dd' with `pv` and `zenity` (apt-get install pv zenity) (pv -n /dev/zero | dd of=/dev/null bs=128M conv=notrunc,noerror) 2>&1 | zenity --title 'Running dd command (cloning), please wait...' --progress # DD with "graphical" return dcfldd if=/dev/zero of=/dev/null bs=500K [root@zinnetb bash_completion.d]#
Kurulmuş cheat dosyalarını görmek için
[root@zinnetb bash_completion.d]# cheat -d /root/.cheat /usr/lib/python2.7/site-packages/cheat/cheatsheets [root@zinnetb bash_completion.d]# cheat -l 7z /usr/lib/python2.7/site-packages/cheat/cheatsheets/7z ab /usr/lib/python2.7/site-packages/cheat/cheatsheets/ab apk /usr/lib/python2.7/site-packages/cheat/cheatsheets/apk apparmor /usr/lib/python2.7/site-packages/cheat/cheatsheets/apparmor apt-cache /usr/lib/python2.7/site-packages/cheat/cheatsheets/apt-cache apt-get /usr/lib/python2.7/site-packages/cheat/cheatsheets/apt-get aptitude /usr/lib/python2.7/site-packages/cheat/cheatsheets/aptitude asciiart /usr/lib/python2.7/site-packages/cheat/cheatsheets/asciiart asterisk /usr/lib/python2.7/site-packages/cheat/cheatsheets/asterisk at /usr/lib/python2.7/site-packages/cheat/cheatsheets/at awk /usr/lib/python2.7/site-packages/cheat/cheatsheets/awk bash /usr/lib/python2.7/site-packages/cheat/cheatsheets/bash chmod /usr/lib/python2.7/site-packages/cheat/cheatsheets/chmod chown /usr/lib/python2.7/site-packages/cheat/cheatsheets/chown convert /usr/lib/python2.7/site-packages/cheat/cheatsheets/convert crontab /usr/lib/python2.7/site-packages/cheat/cheatsheets/crontab curl /usr/lib/python2.7/site-packages/cheat/cheatsheets/curl cut /usr/lib/python2.7/site-packages/cheat/cheatsheets/cut date /usr/lib/python2.7/site-packages/cheat/cheatsheets/date dd /usr/lib/python2.7/site-packages/cheat/cheatsheets/dd df /usr/lib/python2.7/site-packages/cheat/cheatsheets/df dhclient /usr/lib/python2.7/site-packages/cheat/cheatsheets/dhclient diff /usr/lib/python2.7/site-packages/cheat/cheatsheets/diff distcc /usr/lib/python2.7/site-packages/cheat/cheatsheets/distcc emacs /usr/lib/python2.7/site-packages/cheat/cheatsheets/emacs find /usr/lib/python2.7/site-packages/cheat/cheatsheets/find gcc /usr/lib/python2.7/site-packages/cheat/cheatsheets/gcc gdb /usr/lib/python2.7/site-packages/cheat/cheatsheets/gdb git /usr/lib/python2.7/site-packages/cheat/cheatsheets/git gpg /usr/lib/python2.7/site-packages/cheat/cheatsheets/gpg grep /usr/lib/python2.7/site-packages/cheat/cheatsheets/grep gs /usr/lib/python2.7/site-packages/cheat/cheatsheets/gs head /usr/lib/python2.7/site-packages/cheat/cheatsheets/head history /usr/lib/python2.7/site-packages/cheat/cheatsheets/history ifconfig /usr/lib/python2.7/site-packages/cheat/cheatsheets/ifconfig indent /usr/lib/python2.7/site-packages/cheat/cheatsheets/indent ip /usr/lib/python2.7/site-packages/cheat/cheatsheets/ip iptables /usr/lib/python2.7/site-packages/cheat/cheatsheets/iptables irssi /usr/lib/python2.7/site-packages/cheat/cheatsheets/irssi iwconfig /usr/lib/python2.7/site-packages/cheat/cheatsheets/iwconfig journalctl /usr/lib/python2.7/site-packages/cheat/cheatsheets/journalctl less /usr/lib/python2.7/site-packages/cheat/cheatsheets/less ln /usr/lib/python2.7/site-packages/cheat/cheatsheets/ln ls /usr/lib/python2.7/site-packages/cheat/cheatsheets/ls lsof /usr/lib/python2.7/site-packages/cheat/cheatsheets/lsof markdown /usr/lib/python2.7/site-packages/cheat/cheatsheets/markdown mkdir /usr/lib/python2.7/site-packages/cheat/cheatsheets/mkdir mount /usr/lib/python2.7/site-packages/cheat/cheatsheets/mount mysql /usr/lib/python2.7/site-packages/cheat/cheatsheets/mysql mysqldump /usr/lib/python2.7/site-packages/cheat/cheatsheets/mysqldump ncat /usr/lib/python2.7/site-packages/cheat/cheatsheets/ncat netstat /usr/lib/python2.7/site-packages/cheat/cheatsheets/netstat nmap /usr/lib/python2.7/site-packages/cheat/cheatsheets/nmap notify-send /usr/lib/python2.7/site-packages/cheat/cheatsheets/notify-send od /usr/lib/python2.7/site-packages/cheat/cheatsheets/od openssl /usr/lib/python2.7/site-packages/cheat/cheatsheets/openssl pacman /usr/lib/python2.7/site-packages/cheat/cheatsheets/pacman pdftk /usr/lib/python2.7/site-packages/cheat/cheatsheets/pdftk php /usr/lib/python2.7/site-packages/cheat/cheatsheets/php ps /usr/lib/python2.7/site-packages/cheat/cheatsheets/ps python /usr/lib/python2.7/site-packages/cheat/cheatsheets/python rm /usr/lib/python2.7/site-packages/cheat/cheatsheets/rm ...
Bu dosyalar elle de değiştirilebilir.
Cheat içinde arama yapak için
[root@zinnetb bash_completion.d]# cheat -s top history: # To see most used top 10 commands: irssi: # To change the topic /topic <description> notify-send: # To send a desktop notification via dbus: systemctl: # Stop a service systemctl stop foo.service top: top -i <interval> top -s <delay> top -a top -d top -e top -F top -f top -h top -o <key> yaourt: # For all of the above commands, if you want yaourt to stop asking constantly for confirmations,
Bir cevap yazın