![]() ![]() ![]() I am using GNU bash, version 4.4.7(1)-release on 17.04. Output of byobu -version is: byobu version 5.116 Id like to only grep for something in the tail output. The -f option is ignored if the standard input is a pipe, but not if it is a FIFO. In fact the more general problem is if I encapsulate the command in quotes (whether single ' or double "), I get the same error. Tail has the following options: -f The -f option causes tail to not stop when end of file is reached, but rather to wait for additional data to be appended to the input. I get, sh: 1: tail -n 15 /var/log/syslog | grep -v -E "pattern1|pattern2": not found Here begins the problem: If I include the following line in my window.tmux new-window -n log watch -n 1 'tail -n 15 /var/log/syslog | grep -v -E "pattern1|pattern2"' egoebelbeckerlatveria :/var/log grep -n 53799 auth.log 165:Nov 30 17:06:25 latveria sshd 84705 : Accepted publickey for egoebelbecker from 192.168. The combination of watch, tail and grep can be achieved as per my need (thanks to steeldriver for his answer here.) watch -n 1 'tail -n 15 /var/log/syslog | grep -v -E "pattern1|pattern2"' Let’s say we’re looking for one of my logins into the sample server. ![]() So I would like to grep -v on these lines. However the problem (which is completely irrelevant to this thread) that there are lots of entries in my syslog (almost 4/5 lines per second), which I would like to avoid while monitoring. New-window -n log watch -n 1 tail -n 15 /var/log/syslog So far I am able to achieve by doing the following: new-session -AD -s 'root' sudo su. In the upper portion I want to monitor my /var/log/syslog and in the lower one dmesg. I would like the second one to be split horizontally. It I remove -f it works but of course do not wait for new log entries. (On start, it waits for the sudo passwd). Im trying to spawn with tail -f somefile grep sometext but with -f it doesnt work. Viewing everything from a specific IP address. I would like to have a tab (or window?) with a root prompt. The -f flag is what makes the tail command output additional data as it is appended to the log. I am (re)writing my windows.tmux for my frequently used byobu sessions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |