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 mount ,tell me about mount ,how can u use in real time project??
How does a user get the current date, time in UNIX?
What is an Unix command to convert HEX value to ASCII value located in any flat file.
Can a process kill itself in UNIX/or in its various versions?
What UNIX command will control the default file permissions when files are created?
How do you grep recursively?
what is the use of ls -l command & what is the information it gives about user ?
In UNIX, what is the command to edit contents of the file?
What is the functions of zambie process?
How would you find the size of a file or directory?
Explain the steps that a shell follows while processing a command.
What are file commands?