Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-10-2006, 03:19 AM   #1
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,
Old 05-10-2006, 03:46 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
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, 04:01 AM   #3
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.



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 03:13 AM
erase all the lines of a file Prasun1 Linux - General 9 11-06-2005 11:53 AM
How to remove lines from a file doza Linux - General 2 04-27-2005 12:59 PM
File does not exist/Large file support dreamtheater Linux - General 3 04-19-2004 10:14 AM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 08:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:09 PM.

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