- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Bug/Limitation in tail ??
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 03:58 PM
09-26-2005 03:58 PM
In this particular instance it is always return me just 81 lines, the first of which is incomplete (missing the start of the line).
Using wc to summarise here is a copy of my shell window:
______________
> wc ReportCalls.tmp.5872.tmp
37758 730646 9059587 ReportCalls.tmp.5872.tmp
> tail -1200 ReportCalls.tmp.5872.tmp | wc
81 1727 20480
______________
Is there a limit of 20K on tail?
Can it be increased?
Is there a way around this?
It is within the context of a Perl script. doubtless there is a better way to do this using Perl so any hints and suggestions as to how best to do it in Perl would also be appreciated.
Solved! Go to Solution.
- Tags:
- tail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 04:00 PM
09-26-2005 04:00 PM
Re: Bug/Limitation in tail ??
which tail
what tail
Lets get some version information. There may be a patch out there for you.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 04:03 PM
09-26-2005 04:03 PM
Re: Bug/Limitation in tail ??
__________
> whence tail
/usr/bin/tail
> which tail
/usr/bin/tail
> what `whence tail`
/usr/bin/tail:
$Revision: 82.2 $
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 04:04 PM
09-26-2005 04:04 PM
Re: Bug/Limitation in tail ??
_________
> uname -a
HP-UX chccm1 B.11.00 U 9000/800 2016741259 unlimited-user license
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 04:06 PM
09-26-2005 04:06 PM
Re: Bug/Limitation in tail ??
From the man page:
__________
WARNINGS
Tails relative to end-of-file are stored in a 20-Kbyte buffer, and
thus are limited in length. Therefore, be wary of the results when
piping output from other commands into tail.
__________
I guess I need to use something else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 04:26 PM
09-26-2005 04:26 PM
Re: Bug/Limitation in tail ??
Right, you may need to find a better (gnu) tail, or use an alternative for example with awk or perl.
Using awk (minimally tested):
awk 'BEGIN{w=3}END{i=NR-w;while (i++
This sets up a 'circular' array of size 'w' by using the 'mod' operator on the line number, resetting over and over.
At the end, start a window size back from the current line (NR) and print the saved away lines untill teh last line.
In the begin teh window size is declare (here w=3). You could use a command line argument, or a command line provid variable instead.
fwiw,
Hein.
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 04:40 PM
09-26-2005 04:40 PM
Solutionhttp://hpux.connect.org.uk/hppd/hpux/Gnu/textutils-2.1/
-Arun
- Tags:
- gtail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 05:11 PM
09-26-2005 05:11 PM
Re: Bug/Limitation in tail ??
Your responses are much appreciated.
I ended up reading the file one line at a time and turfing the lines prior to the ones of interest. In the context of the script in question it is not an unreasonable way of doing it.
There is more than one way to do it ;-)