LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2006, 02:19 AM   #1
loopoo
Member
 
Registered: Aug 2005
Posts: 40

Rep: Reputation: 15
Last 10 lines of a large file


Hello everybody!

Can anyone please help me with the following issue: I want to get the last 10 lines of a large text file (2GB).

I used tail -n 10 filename, but this doesn't seem to work correctly.

Is there a better command to use for this problem??

I am on AIX 5.2

Thanks in advance,
Chris
 
Old 05-10-2006, 02:46 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I've never used AIX, but on Linux and FreeBSD, "tail -10 filename" works fine for me. Could it be that your problem is a result of the big file size?
 
Old 05-10-2006, 03:01 AM   #3
loopoo
Member
 
Registered: Aug 2005
Posts: 40

Original Poster
Rep: Reputation: 15
Thanks for your post.

I took another look at this problem and it really goes well using 'tail -n 10 filename' command.

Chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing new lines (\n) from a file bkeeper Linux - Software 4 12-15-2005 02:13 AM
erase all the lines of a file Prasun1 Linux - General 9 11-06-2005 10:53 AM
How to remove lines from a file doza Linux - General 2 04-27-2005 11:59 AM
File does not exist/Large file support dreamtheater Linux - General 3 04-19-2004 09:14 AM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration