TAIL(1) General Commands Manual TAIL(1)NAME
tail - deliver the last part of a file
SYNOPSIS
tail _number[___][__] [ file ]
DESCRIPTION
Tail copies the named file to the standard output beginning at a designated place. If no file is named, the standard input is used.
Copying begins at distance +number from the beginning, or -number from the end of the input. Number is counted in units of lines, blocks
or characters, according to the appended option l, b or c. When no units are specified, counting is by lines.
Specifying r causes tail to print lines from the end of the file in reverse order. The default for r is to print the entire file this way.
Specifying f causes tail to not quit at end of file, but rather wait and try to read repeatedly in hopes that the file will grow.
SEE ALSO dd(1)BUGS
Tails relative to the end of the file are treasured up in a buffer, and thus are limited in length.
Various kinds of anomalous behavior may happen with character special files.
4th Berkeley Distribution March 6, 1986 TAIL(1)
Check Out this Related Man Page
TAIL(1) General Commands Manual TAIL(1)NAME
tail - deliver the last part of a file
SYNOPSIS
tail [ +-number[lbc][rf] ] [ file ]
tail [ -fr ] [ -n nlines ] [ -c ncharacters ] [ file ]
DESCRIPTION
Tail copies the named file to the standard output beginning at a designated place. If no file is named, the standard input is copied.
Copying begins at position +number measured from the beginning, or -number from the end of the input. Number is counted in lines, 1K
blocks or characters, according to the appended flag or Default is -10l (ten ell).
The further flag causes tail to print lines from the end of the file in reverse order; (follow) causes tail, after printing to the end, to
keep watch and print further data as it appears.
The second syntax is that promulgated by POSIX, where the numbers rather than the options are signed.
EXAMPLES
tail file
Print the last 10 lines of a file.
tail +0f file
Print a file, and continue to watch data accumulate as it grows.
sed 10q file
Print the first 10 lines of a file.
SOURCE
/sys/src/cmd/tail.c
BUGS
Tails relative to the end of the file are treasured up in a buffer, and thus are limited in length.
According to custom, option +number counts lines from 1, and counts blocks and characters from 0.
TAIL(1)
Hi there,
I am wondering if by logging in to a unix system, if it is possible to get the IP address of the machine I am connecting FROM.
I know how I can do this using the name server, but is this possible without a host lookup?:confused:
Thanks,
-ghoti (15 Replies)
Hi Everyone ,
I am facing a strange problem
i have made the follwing script to watch a appending log file (abc.log) but its not moving after the line tail -f ,
any suggestions
=====================================
#!/bin/bash
while true
do
tail -f abc.log | grep "exceptions"
echo hi... (12 Replies)
How to get a CPU temperature and current power consumption in T5220 server both from system controller and Operating system. I need details by cores. Thanks in advance. (13 Replies)
Hey!!
I'm having a hard time getting this to work!
I need to input a name and compare that name to a file in the file the name has a code on the same line as it, what i need is to compare the input name with the file and then output the code to a other file.
Ex:
... (16 Replies)
Friends!!
I need your help. Where can i change/set the last login details as below in aix 5.3. And how to do that to get the results as exactly below
login as: mbpops
mbpops@xx.28.3.24's password:
Last unsuccessful login: Mon Nov 22 14:32:27 GMT 2010 on ssh from 10.132.5.129
Last login:... (17 Replies)
Hi Guys,
I would like to create a script which tails the content of a log file in real time, looks for a specific string , like "ERROR" and captures in a text file the previous 10.000 lines that were existing before this string.
Any help is appreciated. (12 Replies)
Hi,
I have a requirement to monitor a srver log file realtime for a word 'Started'. Once found, I invoke another program tp perform additional processing.
The code below meets my requirement.
tail -f nohup.out | \
while read line ; do
echo "$line" | grep -i "Started"
if
then
java... (19 Replies)
Hi folks,
As I continue my self-torture , I've come on an interesting issue.
I now have a script that uses top on a Solaris box to gather performance data into a file for use in tracking over all performance.
And it even works 99.99% of the time.
But it glitches eventually and leaves a... (12 Replies)
Hi
I have a file which is updated very frequently.
Where in i wanted to use tail -f command in the script and wanted to grep for a particular word.
But the issue is when i use tail -f filename|grep "word" ...
it will show me blank until the word is found in the real time. if it shows... (13 Replies)
if the last line of an output contains a certain string 'FAILED', i want to print 200 lines from the output.
here's where I got stuck:
process blah blah blah | awk '{if ($0 ~ /FAILED/) y=x "\n" $0; x=$0};END{print y}'
the above only prints the last 2 lines, and it also searches the... (19 Replies)
I have searched through google, and this forum to try and find the answer, but alas, nothing quite hits the whole answer.
I am trying to read the last line (or lines) of some log files. I do this often.
The files are named sequentially, using the date as part of the file name, and appending... (18 Replies)
Hi ,
Could you please tell me how to find the following on AIX?
1.Command to find file system details?
2.What are all the files exist under a specific directory along with their sizes?
In general we use,
du -sh * | grep M under a directory which returns files having size of MB,... (18 Replies)
Hello,
I am trying to create an iptables script with tail ,sed and awk.
1st Request: Search keyword "secret" in access.log file
2nd Request: Get first column matching lines (ip address)
3rd Request: Save it to a file
This is what I did so far:
grep.sh
#!/bin/bash
while true;
do
tail... (23 Replies)
Hi Team,
Can anyone help me here:
I have to access server logs via putty and these logs file is a trailing file (continously updating) with ERROR and WARNINGS... I need to know if I can pull this trailing file to a local drive so that I can do some higlighting on some keywords through Notepad... (13 Replies)
Someone, please help on this issue:-
Note : for security reason i didn't mention hostnames and ips.
==============================================================================
# ntpstat
unsynchronised
polling server every 1024 s
Ntpstat showing unsynchronised.
... (29 Replies)