How can I only see the last 5 lines of a file?

Answers were Sorted based on User's Feedback



How can I only see the last 5 lines of a file?..

Answer / prakash

tail -n5 filename

Is This Answer Correct ?    20 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / senthil

tail -5 filename

Is This Answer Correct ?    17 Yes 1 No

How can I only see the last 5 lines of a file?..

Answer / shyam

tail -5 filename

Is This Answer Correct ?    8 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / vinod

#tail -n5 filename

Is This Answer Correct ?    3 Yes 1 No

How can I only see the last 5 lines of a file?..

Answer / rams

tail -5 <filename>

Is This Answer Correct ?    2 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / arnab chowdhury

#tail -n 5 <filename>

Is This Answer Correct ?    2 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / prashant

#tail -5 "filename"

Is This Answer Correct ?    1 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / madhava reddy

#tail -5 <filename> press enter

Is This Answer Correct ?    1 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / gaurav chaudhary

#tail -n -5 <filename>

Is This Answer Correct ?    0 Yes 0 No

How can I only see the last 5 lines of a file?..

Answer / swarup devalekar

tail -n filename

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More Linux Commands Interview Questions

What are the commands in linux?

0 Answers  


What could be the problem when a command that was issued gave a different result from the last time it was used?

0 Answers  


Why makefile is used in linux?

0 Answers  


What is $@ in shell?

0 Answers  


How do I list all processes in linux?

0 Answers  






What is df command in linux?

0 Answers  


What is p command?

0 Answers  


Hi All of Unix/Linux professional Q.Why soft link file not open by cat command. Ihave make following symbolic link but when i open with #cat linkfilename it does not oped please see the following code and try to answer. # ln -s file1 ~/mydir/filea [root@dhcppc0 ~]# cd mydir [root@dhcppc0 mydir]# ls -l total 4 lrwxrwxrwx 1 root root 5 2010-04-04 09:04 filea -> file1 [root@dhcppc0 mydir]# cat filea cat: filea: No such file or directory

2 Answers  


A file which is not deleted by normal user and also root (using rm), for that type of file how we delete it?

5 Answers   CTS,


What are the commands used in command prompt?

0 Answers  


what is the booting process of linux systen and explain it,is the first process comes under the installation process.

3 Answers   CSC, EA Electronic Arts, Mind Tree, vsworx,


our wish to print the file vacations with 60 lines to a page. Which command will accomplish this?

2 Answers  


Categories