- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tail command foo
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
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
тАО09-08-2004 09:15 AM
тАО09-08-2004 09:15 AM
If I tail -5000 a file that has 50000 lines
I get 5000 lines.
If I tail -5000 and redirect > to another
file name I only get 703 lines.
Does anyone know why?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 09:25 AM
тАО09-08-2004 09:25 AM
Re: tail command foo
" 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."
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 04:24 PM
тАО09-08-2004 04:24 PM
Re: tail command foo
regards
SK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 12:23 AM
тАО09-09-2004 12:23 AM
Re: tail command foo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 12:28 AM
тАО09-09-2004 12:28 AM
Re: tail command foo
# print last 10 lines of file (emulates "tail")
sed -e :a -e '$q;N;11,$D;ba'
Change the "11" to whatever number you're trying to retrieve.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 02:33 AM
тАО09-09-2004 02:33 AM
Re: tail command foo
awk will be the answer.. its really powerful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 03:53 AM
тАО09-09-2004 03:53 AM
Re: tail command foo
awk '{ if ( NR >= 10 ) print $0 }' file
So that it will print the liens after line number 10 there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 04:31 AM
тАО09-09-2004 04:31 AM
Re: tail command foo
Try to create a file as,
vi /usr/bin/less
chmod 755 /usr/bin/less
You can test as,
echo "bye\nfor\nnow" | less 2
It will give
for
now there.
You can test the files too as,
less 2 /usr/bin/less
# Normal end
exit 0
It will be used there. You can edit to make it efficient more.
HTH.
-Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2006 12:25 AM
тАО09-26-2006 12:25 AM
Re: tail command foo
sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt
Could you please explain me the above statement -- phrase wise.
as early as possible.
Thanks,
Subbu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2006 01:48 AM
тАО09-26-2006 01:48 AM
Re: tail command foo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2006 04:18 AM
тАО09-26-2006 04:18 AM
Re: tail command foo
11.23 - PHCO_31564
11.11 - PHCO_27138
11.00 - none
10.20 - none
none = no patch, tail is limited to 20K bytes of data (not lines) and cannot be changed.
Bill Hassell, sysadmin