linux terminal

源于对历史的不了解,linux console,linux terminal和linux shell常常让人困惑。linuxbase上的一篇文章https://www.linuxbabe.com/command-line/linux-terminal讲的非常清楚,又有非常珍贵的插图可以形象的看到那些已经早就淘汰的骨灰级硬件。 通过终端连上服务器后,运行tty,可以看到当前终端对应的文件, /dev/pts/0 man pts就可以了解这个虚拟的tty的创建过程。

Published
Categorized as linux

Why tail -f doesn’t work

It is really wired to see tail -f doesn’t work on one of my server. File is changing, but tail doesn’t output anything.I am really curious. First, I straced tail strace tail -f file.log open(“file.log”, O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0644, st_size=1, …}) = 0lseek(3, 0, SEEK_CUR) = 0lseek(3, 0, SEEK_END) = 1lseek(3, 0, SEEK_SET) = 0read(3,… Continue reading Why tail -f doesn’t work

Published
Categorized as linux