LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Last 10 lines of a large file (https://www.linuxquestions.org/questions/linux-newbie-8/last-10-lines-of-a-large-file-443339/)

loopoo 05-10-2006 02:19 AM

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

reddazz 05-10-2006 02:46 AM

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?

loopoo 05-10-2006 03:01 AM

Thanks for your post.

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

Chris


All times are GMT -5. The time now is 07:15 AM.