2014-02-22 21:49:40 +00:00
|
|
|
# tail
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Display the last part of a file.
|
2014-02-22 21:49:40 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show last 'num' lines in file:
|
2014-02-22 21:49:40 +00:00
|
|
|
|
|
|
|
`tail -n {{num}} {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show all file since line 'num':
|
2014-03-19 11:49:24 +00:00
|
|
|
|
|
|
|
`tail -n +{{num}} {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show last 'num' bytes in file:
|
2014-02-22 21:49:40 +00:00
|
|
|
|
|
|
|
`tail -c {{num}} {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Keep reading file until ctrl-c:
|
2014-02-22 21:49:40 +00:00
|
|
|
|
|
|
|
`tail -f {{file}}`
|