- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tail -1000 lines displays only 207 lines
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
Discussions
Discussions
Forums
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
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
тАО12-11-2000 02:35 AM
тАО12-11-2000 02:35 AM
When executing (for example) a "tail -1000 textfile" command on a file containing for example 1711631 lines I only get 207 lines on the 11.00 server and 381 lines on the 10.20 server.
The manual doesn't say anything about limitations.
Solved! Go to Solution.
- Tags:
- tail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 02:46 AM
тАО12-11-2000 02:46 AM
Re: tail -1000 lines displays only 207 lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 02:49 AM
тАО12-11-2000 02:49 AM
Re: tail -1000 lines displays only 207 lines
There is no such limitation for 'tail', especially when 'tailing' a few hundred files.
As the problem cause is most probably somewhere else, isn't the file located on an NFS filesystem. NFS is known to have a bug with "tail -f" which is solved by latest "NFS Kernel/Performance patch"
Best regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 02:51 AM
тАО12-11-2000 02:51 AM
Re: tail -1000 lines displays only 207 lines
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 02:54 AM
тАО12-11-2000 02:54 AM
SolutionThe man page on tail states:
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.
Various kinds of anomalous behavior may occur with character
special files.
Could use the following as a work-around ?
wc -l FILENAME # get total number of lines
sed -n LINESTRART+1,LINEENDp SOURCEFILE > DESTINATIONFILE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 03:58 AM
тАО12-11-2000 03:58 AM
Re: tail -1000 lines displays only 207 lines
But the sed-command is solves my problem. Thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 04:56 AM
тАО12-11-2000 04:56 AM
Re: tail -1000 lines displays only 207 lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2000 10:59 AM
тАО12-11-2000 10:59 AM
Re: tail -1000 lines displays only 207 lines
time ago. The GNU tail probably does it the right way.
Failing that, here's a simple way to use awk to do a 'tail -n###'
without the buffer limitation of the tail command:
awk 'NR >= ###' filename
The awk special variable 'NR' is the record number (i.e. line
number). The '###' is the line number you want to start at.
Since there's no action defined, the default action of '{print}' is
used.
- Tags:
- gtail