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 |
can we use cat command as an editor ..???
What is {} in find command?
what is the use of "test" command in unix?
what do you understand bythe term 'de-mountable volumes'?
Write a grep (or grep) command that selects the lines from a file that have exactly three characters.
What difference between cmp and diff commands?
Explain command to display different lines that are found when compare two files?
How to add content of one file into another file at the beginning
Explain ‘system calls’ with respect to unix commands?
Write a command to find all of the files which have been accessed within the last 30 days.
5 Answers Google, IBM, Satyam,
What is the size of time_t?
what are the uses of filters?