Bazı Faydalı Linux Komutları
1-)
[EN]Sometimes you may want to take a look at a file, only to the first lines of it, this is specially useful when you are watching at CSV files that you may be using to work with MySQL or PosgreSQL databases, in this cases what we need is to look at the head of the file to see its structure, but not all the file. To do this we use the head command.
[TR]Bazı durumlarda (.sql dosyalarına gözatmak, büyük dosyaların tamamını açmadan kontrol etmek, log dosyalarını kontrol etmek vs.) büyük boyutlu dosyaları ya da tamamını açmanın sıkıntılı olduğu durumlarda, bir dosyanın baştan belli satırlarına göz atmak isteyebilirsiniz. Bu gibi durumlarda;
root@mylinux:~# head -10 xxx.sql (first 10 lines of -xxx.sql- dosyasının ilk 10 satırına bakmak için)
2-)
[EN]Last 10 lines of a file
[TR]Dosyanın son 10 satırı için;
root@mylinux:~# watch tail -n 10 mylogfile.log
(*) Will be updated periodically.
(*) Düzenli olarak güncellenecektir.