A file has 1000 lines and i want to display only 1st line
how to do it?
pls ..tel me

Answer Posted / namdeo patil

head -n 1 filename

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I search a whole word in vim?

771


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

712


How to use grep command to list find the records of a file containing 10 different strings?

729


What are some command words?

670


What is the search command in unix?

678






How do you grep a case insensitive?

621


Can you enlist some commonly used network commands?

681


What is .sh file?

729


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

849


What does sed command do in unix?

657


What does pipe () return?

677


What is the use of awk command in unix?

654


What is the difference between cat command and more command?

677


Enlist some filename manipulation commands in unix.

630


Explain mount and unmount command.

717