what is the command to print last 8 lines of any text file.

Answer Posted / meghna

sed -n '$-8 , $p' filename

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to sort the content of the file based on numeric values

1266


What is the difference between cat command and more command?

607


What is the difference between grep and grep?

578


What is the behavioural difference between cmp and diff commands?

690


How do I search a whole word in vim?

704






What is the nmap command?

596


Explain ‘library functions’ with respect to unix commands?

612


What is ‘ps’ command for?

624


Describe the usage and functionality of the command rm –r * in unix?

833


What are bash commands?

606


What is the function of grep command in unix?

607


What is .sh file?

629


Give the command for finding the current date.

591


What is grep and how do you use it?

585


Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

657