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 shell for dos,nt operating systems?
What is the different between UNIX command and UNIX shell script?
What is ctrl d?
Write a command to find all of the files which have been accessed within the last 30 days.
What is the basic difference between unix and windows operating systems?
43 Answers Bopro, College School Exams Tests, CTS, IBM, IT-Kids, Priyadarshini, Sybian Technologies, Tolani Maritime,
what these two commands prints "echo test","cat test"?
What is FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands?
how to change a normal file into hidden file
distinguish between interrupts and exceptions?
what are the different hardwares available?
What is the use of tee command?
what is the use of nice command?