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 |
Explain mount and unmount command.
How do I open a port?
1-how will you display a file whose name is starting with '- '? 2-how will you add a patten at end of every line in vi editor?
what does a process mean?
What are the differences among a system call, a library function, and a unix command?
How do I clear my terminal history?
Which RAID Levels supported by LVM?
Write a command to find all of the files which have been accessed within the last 30 days.
How do you find which version and name of unix you are using at the command prompt?
How do you find path of a directory? Give its syntax.
Can a process kill itself in UNIX/or in its various versions?
What is the use of pipes?