what is the command to print last 8 lines of any text file.
Answer Posted / 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 |
Post New Answer View All Answers
Using unix command how to display no of records in oracle?
What is the command to find maximum memory taking process on the server?
What are the dos commands?
What is used to type command?
What do chmod, chown, chgrp commands do?
Who command in unix operating system?
How many unix commands are there?
What is grep r?
Which command is used to copy files?
What does grep v do?
What do chgrp command do?
What is grep command in unix with examples?
What is pipe command in unix?
Can you enlist some commonly used network commands?
What difference between cmp and diff commands?