Komutların sırasını ve tarihlerini görebilmek için
export HISTTIMEFORMAT='%F %T ' history | more 1 2008-08-05 19:02:39 service network restart 2 2008-08-05 19:02:39 exit 3 2008-08-05 19:02:39 id 4 2008-08-05 19:02:39 cat /etc/redhat-release
Ctrl+R ile historyde arama yapılabilir.
Her Ctrl+R basıldığında bir diğer arama sonucu getirilir.
Sağ-Sol ok tuşları ile bulunan komut alınabilir.
History sırasına göre komut çalıştırmak için
history | more 1 service network restart 2 exit 3 id 4 cat /etc/redhat-release !4 cat /etc/redhat-release Fedora release 9 (Sulphur)
Başlangıcı bilinen (ps ile başlayan son komut) komutu history’de çalıştırmak
!ps ps aux | grep yp root 16947 0.0 0.1 36516 1264 ? Sl 13:10 0:00 ypbind root 17503 0.0 0.0 4124 740 pts/0 S+ 19:19 0:00 grep yp
Komutun historyde görünmemesi için
export HISTCONTROL=ignorespace ls -ltr pwd service httpd stop [Note that there is a space at the beginning of service, to ignore this command from history] history | tail -3 67 ls -ltr 68 pwd 69 history | tail -3
Bir cevap yazın