我只是尝试使用下面的命令在目录上尾随,以查看发生了什么。我得到两种不同的结果。有人可以向我解释吗?
1。
tail -f -n +1 <testDir>
输出:
tail: error reading ‘testDir’: Is a directory
2。
tail -f -n +2 testDir
输出:
tail: error reading ‘testDir’: Is a directory
tail: testDir: cannot follow end of this type of file; giving up on this name
tail: no files remaining
我担心的是,如果在命令中使用+1
至+2
,为什么输出会发生变化?