Watching updates at the end of a file, with or without the tail utility
2
votes
1answer
13 views
multitail - custom config (multitail.conf) location
Is it possible to provide a custom location for multitail.conf - or are my only options /etc/multiltail.conf or ~/multitail.conf?
I'd like to provide a specific config file that has regexes specific ...
2
votes
3answers
43 views
What does “tail -f ” do? [duplicate]
I don't understand the function of the option -f added to the tail command.
I know that tail views the "last" part of a file. The manual says that
-f outputs appended data as the file grows
But ...
14
votes
2answers
1k views
How do I “cat and follow” a file?
A file is being sequentially downloaded by wget.
If I start unpacking it with cat myfile.tar.bz2 | tar -xj, it may unpack correctly or fail with "Unexpected EOF", depending on what is faster.
How to ...
1
vote
1answer
21 views
How to echo from specific line of a file to another specific line [duplicate]
Assume I have a file with about 10000 lines.
How can I print 100 lines, starting from line 1200 to line 1300?
4
votes
2answers
42 views
continuous reading from named pipe (cat or tail -f)
I have configured rsyslog to log certain log events to /dev/xconsole:
*.*;cron.!=info;mail.!=info |/dev/xconsole
/dev/xconsole is a named pipe (fifo). If I want to see what is being logged, I ...
4
votes
4answers
131 views
How to get lines 10 to 100 from a 200 line file into a new file [duplicate]
I have file with 200 lines.
I need to extract lines from 10 to 100 and put them into a new file.
How do you do this in unix/Linux?
What are the possible commands you could use?
1
vote
2answers
49 views
Temporarily freeze a process upon shell interaction
Let's say on a single console I have tail -F running, showing the output of many log files in realtime.
Sometimes I need to run commands there too, however, and examine their output briefly, without ...
3
votes
2answers
28 views
tail display whole file and then only changes [duplicate]
My Linux version is 2.6.32-47-server (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #109-Ubuntu SMP Tue May 7 02:17:05 UTC 2013
I am currently doing a tail -f file and life is good. But that only ...
0
votes
1answer
42 views
Is it possible to `tail -f /dev/vcs`?
I would like to get a continuous stream of output from the virtual terminal. Is that possible? If not, why is tail -f not working here?
5
votes
3answers
264 views
tail -f, Determine if a file is no longer being written to [closed]
I am using tail -f to follow the growth of a log file. I am having trouble finding a way to detect if the process that is writing to the log file (when it crashes or is otherwise terminated) is no ...
4
votes
2answers
517 views
What does tail -f <directory name> do?
I mistakenly executed the following command in the terminal:
tail -f /logs/applications/logs*
I got the following output:
tail: file shrunk!
Error 0
I am not sure what exactly happened. I have ...
1
vote
2answers
114 views
What does tail -0a do?
In the documentation for logstash, they mention the command tail -0a
I have never heard of the -a flag and I can't find any information on google, tail --help or the man pages.
What is the ...
1
vote
1answer
92 views
Convert newlines to null-delimited when using tail
How can I change the output from tail to use null-terminated lines instead of newlines?
My question is similar to this one: How to do `head` and `tail` on null-delimited input in bash?, but differs ...
23
votes
1answer
708 views
Do I need to worry about “tail: unrecognized file system type 0xbeefdead”?
I'm trying to follow a regular text file with tail -f -n 50 filename. I get the information from the file just fine, except I always get this error message:
tail: unrecognized file system type ...
0
votes
3answers
69 views
Is it possible to change the default COUNT value of tail and head?
The less command accepts its defaults with an environment variable LESS, so you can
export LESS='-F -g -i -M -R -S -w -X -z-4'
at the beginning of your session.
Is it possible to change the ...
1
vote
2answers
204 views
will tail with piping read whole file?
I want to read a big log file with 10000 lines everytime.
and I use this command:
tail -c +offset somefile | head -n 10000
my question is, with the piping of head, will tail read the whole file?
...
1
vote
1answer
156 views
how do i redirect output from tailf & grep to a file [duplicate]
All I wanted is to grep for specific lines in an ongoing log and re-direct it to some file..
tailf log | grep "some words"
Now, I want the above command output to get re-directed to some file in ...
0
votes
1answer
46 views
Need to grep for specific lines from ongoing log and save it in some file
So, let me start with the overall outcome that i want to achieve.
There is just one log, which will have info on certain devices, that i am upgrading.
I use "tailf log" to monitor the log.
Now, ...
8
votes
4answers
834 views
Grep from the end of a file to the beginning
I have a file with about 30.000.000 lines (Radius Accounting) and I need to find the last match of a given pattern.
The command:
tac accounting.log | grep $pattern
gives what I need, but it's too ...
4
votes
2answers
40 views
Can less load lines which were appended to a file after opening?
When I am viewing a log file in less is it possible to make less reload the file to get lines which were appended to that file since it was opened?
0
votes
1answer
55 views
Stop tailing log
I have a problem, I accidentally did tail -f on a log, but now I cant quit! - Its the anaconda log during a redhat install. Control-C doesn't seem to work, I guess due to it saying sh: no job control ...
2
votes
1answer
112 views
Piping periodic data between Python scripts
How to receive data from the environment e.g. bash
I am trying to launch two Python scripts in bash and pipe stdout from one of them to stdin of the other. The first script outputs a single ...
0
votes
2answers
201 views
Tail multiple files and output as additional column with 'find' results
Would like to pull the last line of text from a specific (multiple) files in a directory. Additionally, I'd like the results to be in a more traditional column format (like ls) with path, rather than ...
2
votes
3answers
216 views
How to tail a file over the network?
How can I tail -f a file that over the network, say at \\192.168.2.130\public\print.log?
I have tried the variations of the following:
tail -f //192.168.2.130/Southpaw/Tactic/print.log which erred ...
3
votes
2answers
113 views
How can I monitor a file that fully recreates during its run?
This is a follow-up question of
Why are some file changes not shown in tail -f?
With the use of capital F: tail -F I can monitor the output of
tail -F ~/.mysql_history
from the manual:
...
3
votes
1answer
92 views
Why are some file changes not shown in tail -f?
I tried to follow the mysql history file with:
tail -f ~/.mysql_history
in another window I entered as the same user:
mysql -u someotheruser -p
and none of the following commands are shown in my ...
5
votes
2answers
135 views
Show tail of files in a directory?
I have a directory that is too huge to browse by any means. Grepping returns argument lists too long, WINSCP crashes when trying to open the directory.
Is there a way I can view just the last 200 ...
71
votes
3answers
3k views
Does tail read the whole file?
If I want to tail a 25 GB textfile, does the tail command read the whole file?
Since a file might be scattered on a disk I imagine it has to, but I do not understand such internals well.
4
votes
1answer
143 views
How can I colorize head, tail and less, same as I've done with cat?
I've got 'color cat' working nicely, thanks to others
(see How can i colorize cat output including unknown filetypes in b&w?).
In my .bashrc:
cdc() {
for fn in "$@"; do
source-highlight ...
1
vote
1answer
37 views
Get last changed content since last read
How can I get the last changed content of a file, since its last read?
Something more precise that this:
tail - <nr >file_1.txt >file_2.txt
where file_2.txt gets the last modified ...
2
votes
1answer
461 views
Search and Filter Text on large log files
I use the tail, head and grep commands to search log files. Most of the time the combination of these 3 commands, in addition to using pipe, gets the job done. However, I have this one log that many ...
1
vote
4answers
186 views
How to change color of a character while tailing and tr
I regularly use this command line but I would like to change the color of the "|" to green in the output. Does anyone know how I can accomplish this?
tail -f file.log | tr '\001' '|' | grep TEST
4
votes
5answers
242 views
Only output most recent 10 (or n) lines of a lengthy command output
I have currently worked alot with shell and bash on linux.
I have made tons of backups scripts and much more.
In many cases I have a command that outputs thousands of lines. I actually need these ...
1
vote
2answers
83 views
How to hide the . and .. from ls
When I run ls -l on a directory, I see an entry titled '.' How can I remove the row containing '.' from the output?
ls -latr /foo | tail -n5
-rw-rw-r-- 1 guest bar 59169 Aug 20 12:22 ...
2
votes
1answer
331 views
Periodically get new lines from file, possibly logrotated
I'm looking for a fairly simple way (no development involved -- I could write this in Python but I'm hoping there's something already out there).
I have a log file (in my case written by rsyslogd). ...
2
votes
3answers
224 views
Exception handling when using tail -f to monitor a log
I have a main script calling the script to do the monitoring.
I am trying to catch the exception that the log is missing or not accessible anymore.
tail -f is used instead of -F since the logs are ...
2
votes
2answers
76 views
whats a good tool to search tail -f output
I am dumping some debug info into a text file that I am using tail -f to monitor.
Is there a tool that I can then pipe that tail -f data into to be able to search the text on screen using regular ...
1
vote
4answers
311 views
Tail -f the most recent log file
In a few spots I got this to work
ls -rt /path/to/log/file/ | tail -1 | xargs tail -f
But I can't figure out why it won't always work
(This is quick fix until I get the log rolling fixed here)
3
votes
2answers
709 views
Using tail to follow daily log file in Bash
I have a task to use a bash script to monitor a couple of log files named with the current day, eg. YYYY-MM-DD.log.
(1) I used tail -f to follow the file but unable to deal file rotation.
Even if ...
4
votes
3answers
1k views
How do I make Vim behave like “tail -f”?
I would like to know if there is a way to make Vim behave like tail -f.
Even the best Vim plugin I've found so far doesn't do what I expect.
I really want to see the file update in real-time. Even ...
2
votes
1answer
598 views
Issue with real-time log inspecting piping tail, grep and cut
I have to inspect a growing log in real time, and I found an issue that makes me miss some lines (I can't understand exactly what lines) using tail -f or tailf, grep and cut.
I use grep because I ...
3
votes
4answers
677 views
is there an alternative to tail -f that has convenient scrolling? [duplicate]
I'm usually inside GNU Screen or tmux, which doesn't give me excellent scrolling functionality. Is there an alternative to tail -f that allows me to quickly scroll up?
A tool that is like most is to ...
3
votes
1answer
103 views
How to follow and seek in a file being piped through a filter, in less
I basically wish to seek, search and follow a growing log file after passing it through a sed filter. I figured I need to follow a file with tail -f pipe it to sed and then pipe that to less. For ...
1
vote
2answers
165 views
tail -f but suck in content of the file first (aka `cat -f`)
I need to display whole file before tracking it for a new changes, not only the last 10 lines (yep, I know it's not tail conceptually). In other words, something like cat -f would do, if it would ever ...
1
vote
1answer
138 views
POSIX head and tail not feature equivalent
The documentation for POSIX tail's -n option says that
The origin for counting shall be 1; that is, -n +1 represents the first line of the file, -n -1 the last.
So tail -n 10 (used later on the ...
2
votes
1answer
84 views
Making less's follow option show line movement
I often find myself using less to display log files that contain hundreds of
contiguous, identical lines that are appended to the files at set intervals.
For example,
something happened
something ...
9
votes
1answer
281 views
How to do `head` and `tail` on null-delimited input in bash?
find command can output names of files as a null-delimited strings (if -print0 is provided), and xargs can consume them with -0 option turned on. But in between, it's hard to manipulate that ...
0
votes
1answer
108 views
Tailing a New File with an Old Name [duplicate]
This is along the lines of How to start tailing a file that has not been yet created with a twist: a file with the name already exists.
I have a program that is run multiple times; when the output ...
4
votes
0answers
75 views
Combing head and tail in a single call via pipe [duplicate]
On a regular basis, I am piping the output of some program to either head or tail.
Now, suppose that I want to see the first AND last 10 lines of piped output, such that I could do something like
...
0
votes
3answers
349 views
Using tail command to create a file
This is what I did using tail command. When I try to output the file to screen the file is empty.
~]$ tail > AFS2F1
PASSES ALL DATA FROM INPUT TO OUTPUT
PASSES ONLY SPECIFIED COLUMNS
PASSES NUMBER ...









