'What is tail -n0 -f vs tail -n1 -f [closed]
I have wrote a simple script to keep monitor log file and append line and have implement some if statement if memet.
From my understanding, tail -n0 -f and tail -n1 -f both will does the job where you tell your script to keep monitor this log file of last line at the time and append one at the time.
Key thing is last line.
Solution 1:[1]
tail -n0 -f print NO lines, then waits for incoming new lines.
tail -n1 -f print the last line of the input file, then waits for new lines.
If no -n is provided, it defaults to 10.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Antonio Petricca |
