Thursday, 15 August 2013

unix - tail -f command and null copy doesn't work well -



unix - tail -f command and null copy doesn't work well -

why tail command -f alternative not work well. when target file null clear, tail command not write out anymote.

tail -f hoge& cp /dev/null hoge

tail has tail -f alternative checks see if file has been changed.

from man page:

the -f alternative implies -f option, tail check see if file beingness followed has been renamed or rotated. file closed , reopened when tail detects filename beingness read has new inode number. -f alternative ignored if reading standard input rather file.

unix

No comments:

Post a Comment