Questions tagged [tail]
Watching updates at the end of a file, with or without the tail utility
426
questions
0
votes
1
answer
33
views
Run a few identical process and then kill one of them
Problem:
Need to run several process, especially it will be “tail -f log.log >> wrile_log.log” proces to collect log.
Commands can be run at the different time for same log file. This is not ...
1
vote
1
answer
40
views
How to know when a following tail moves from old file to the new one
So, I am working with tail -F ( or tail --follow=filename). Now it works as advertised and when a rollover occurs it will move to the new file.
This is great and helps me keep track of my logs. The ...
1
vote
3
answers
83
views
How to tail continuously a log file that is being deleted and recreated?
I need to extract information from a log file that is deleted and recreated every time a program runs. After detecting that the file exists (again), I would like to tail it for a certain regexp.
The ...
0
votes
0
answers
81
views
How can I save the output of tail to my clipboard or somewhere on a SSH session where there is only a unidirectional connection and server is limited?
I have to report some logs from some of the servers in our infrastructure which I have limited permissions on. Every time I copy 1000 lines of logs and paste it into Slack, I can't do scp from the ...
16
votes
5
answers
5k
views
How do I read the last lines of a huge log file?
I have a log of 55GB in size.
I tried:
cat logfile.log | tail
But this approach takes a lot of time. Is there any way to read huge files faster or any other approach?
0
votes
0
answers
107
views
Can't clear / scroll-back buffer when using tail -f alacritty?
When I use tail with the -f option, I can not find anyway to clear the screen. It just shows a ^L. Same problem when following live logs with docker.
While I'm just in the shell, the cmd-k works fine.
...
1
vote
0
answers
33
views
pfSense (FreeBSD) - tail -f not showing entire log when filtering with cut or sed [duplicate]
I have a strange problem when trying to display logs on pfSense (and I can reproduce the same problem on Ubuntu server also).
The problem is this (with examples):
I'm trying to display a running dhcp ...
1
vote
1
answer
193
views
How to tail -f multiple files and grep each file individually in single output?
I have several log files (related to my webserver aka various error_log, access_log, etc.) that I want to monitor in real time, ie to see recent updates AND I need to filter each file individually ...
-1
votes
2
answers
26
views
Linux "watch" command showing last 30 lines of nft list ruleset [duplicate]
I want to constantly see last 30 lines of code "nfc list ruleset" in Debian Bash. Something like this:
watch -n 1 nft list ruleset | tail -n 30
But above code doesn't show last 30 lines of &...
0
votes
1
answer
65
views
tail -f, multi sed [duplicate]
I can do
tail -vf -c5 thefile \
| cat -n \
| sed -E 's/a/b/g' \
;
But the following gives no output.
tail -vf -c5 thefile \
| cat -n \
| sed -E '...
3
votes
2
answers
384
views
Tail -f | sed. Modify text for color
I am modifying the text following tail -f.
I have the following program that monitors a file:
tail -vf -c5 /tmp/index \
| cat -n \
| ...
1
vote
1
answer
472
views
Alpine linux: replace BusyBox tail to GNU tail
I need to use the tail ... --pid=PID option in my docker container that is based on Alpine image in order to I can kill the running background tail process automatically.
Unfortunately the BusyBox ...
1
vote
1
answer
47
views
How to follow constantly a keyword in multiple files and include filename beginning of each reported line
tail -f a/b/c.log d/e/f.log
logs like this:
==> a/b/c.log <==
xxx
yyy
Exception happened 1
zzz
==> d/e/f.log <==
rrr
Exception happened 2
sss
How to change command so that the lines ...
0
votes
2
answers
322
views
Extract parts of a string using head and tail only
Hello I would like to know if there is a way where I can only use head, tail, and pipes (and redirection eventually) to extract and output the start, middle characters, and end of a string
Example:
...
1
vote
2
answers
360
views
Head/Tail command to grab multiple sets of lines
I have to grab the first two lines, the lines 43 and 44, and the last 2 lines from a file in one conduct of commands.
Is there away to print those while only using head, tail and pipe commands AND ...