what is the command to print last 8 lines of any text file.
Answers were Sorted based on User's Feedback
Answer / santosh sathe
1) use tail -8 filename
2) This will print last three lines of a file
cat 1.lst
hi
hello
bye
good
morning
sed -n '1,2!p' 1.lst
o/p
bye
good
morning
The last 3 lines are printed.sed command uses !(negation)
operator for skipping the 1st and 2nd line,That means it
will print all the lines except 1st and 2nd.
| Is This Answer Correct ? | 0 Yes | 1 No |
what is the default signal kill in unix?
what is the command to get help on a UNIX terminal?
What is the general format of unix command syntax?
What is awk command used for?
Give Command that will change the name of a directly from paypal to eBay
What are the differences among a system call, a library function, and a unix command?
How do you copy a directory with many files and folders into another directory?
How do I search a whole word in vim?
How do I open a port?
What are the commands in UNIX to list the files in a Directory?
What is the use of egrep command in unix?
What is “chmod” command?