LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 03: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, 03:46 AM   #2
reddazz
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
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 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

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

All times are GMT -5. The time now is 03:08 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration