İngiltere’de Gazze Protestosu
Ağustos 15, 2014 § Yorum yok § Kalıcı bağlantı
Ankara…
Ağustos 8, 2014 § Yorum yok § Kalıcı bağlantı
Linux Cheat
Ağustos 7, 2014 § Yorum yok § Kalıcı bağlantı
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,
Linux’de Font Kurmak
Ağustos 7, 2014 § Yorum yok § Kalıcı bağlantı
Temel olarak 2 yol kullanılabilir
1.Paket köneticisi kullanılarak:
Örneğin Microsoft’un kullandığı bazı font paketlerini bulabilmek için:
[root@zinnetb ~]# yum search font| less
kullanılabilir.
2.Daha genel olarak paket yöneticisi kullanmadan:
Linux sistemlerde fontlar
/usr/share/fonts
/usr/share/X11/fonts
/usr/local/share/fonts
~/.fonts
dizinlerinden birinde tutulur.
Herkesin kullanmasını istediğimiz fontlar /usr/share/fonts dizininde, şahsa özel fontlar ise ~/.fonts dizininde tutulabilir.
Örneğin http://img.dafont.com/dl/?f=aligot_de_mirabelle adresinden fontu beğendik ve download ettik diyelim.
Şimdi fontu yüklemek için önce zip dosyasını açalım.
[root@zinnetb Downloads]# ls -l total 1220 -rw-r--r--. 1 fatih fatih 42925 Aug 7 13:05 aligot_de_mirabelle.zip -rw-r--r--. 1 fatih fatih 1200999 Jun 27 10:53 Video Formats Guide.pdf [root@zinnetb Downloads]# ls aligot_de_mirabelle.zip Video Formats Guide.pdf [root@zinnetb Downloads]# unzip aligot_de_mirabelle.zip Archive: aligot_de_mirabelle.zip inflating: Aligot de Mirabelle.ttf inflating: Selling = license.txt
Şimdi fontu /usr/share/fonts/ dizinine kopyalalım, fc-cache ile font cahceimizi güncelleyip, fc-list ile fontun kurulu olduğuna emin olalım.
[root@zinnetb Downloads]# mv Aligot\ de\ Mirabelle.ttf /usr/share/fonts/ [root@zinnetb Downloads]# fc-cache -f [root@zinnetb Downloads]# fc-list | grep Aligot /usr/share/fonts/Aligot de Mirabelle.ttf: Aligot de Mirabelle:style=Regular [root@zinnetb Downloads]#