Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*"
Favorites infavorites:mine
Status closed:yes
Types is:question
Exclude -[tag]
For more details on advanced search visit our help page
Results tagged with Search options answers only user 63775

Watching updates at the end of a file, with or without the tail utility

The function of tail is to show the last part - "tail" - of the input or file. (The option -f is about what it does later, so that is not relevant here.) Let's think about a file: What is the last … we know n further lines If we now come to the end of the file, we know that the last n lines we kept are in fact the last n lines of the file. Now, in the case of tail -f /etc/passwd | tail the …
answered Sep 14 '14 by Volker Siegel
Use "less" instead of "tail" for scrollback and search You can use tail -f error.log or, better: tail -F error.log. But if you want to scroll back in the file, that's not very useful. With less … +F error.log you get the function of tail -f, but can interrupt the reading of new input with Ctrl+C. Then, you are in the normal less mode, where you can scroll back to see what you may have …
answered Sep 9 '14 by Volker Siegel
If you want to show a short file, that fits on one terminal screen, and what is changing is possibly the whole file, you could use watch: watch cat example.txt Every 2.0s: cat example.txt …
answered Aug 3 '14 by Volker Siegel
. Prefix the key with + instead of - and use that just like an option: Replacing tail -f: less +F growing-file.log To continue following the file by name, even if it's moved away or deleted, and … recreated with the same name, add the option --follow-name; It modifies what the key F and +F do, it does not start following by itself: Replacing tail -F (--follow=name): less --follow-name +F rolling …
answered Apr 14 '15 by Volker Siegel
Yes, less can follow by file name The feature has a fairly obscure syntax: less --follow-name +F file.log With less, --follow-name is different from the tail option --follow=name. It does not … less in follow mode. But you can use the command line to give keystrokes to execute after startup, by prefixing them with +. Combining the modifier option with +F, less will actually start in the (modified) follow mode. Use +F alone for the equivalent of plain tail -f: less +F file.log …
answered Apr 15 '15 by Volker Siegel