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

Answer Posted / eswar

head -n 1 filename

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

794


Who wrote grep?

577


Name the various commands that are used for the user information in unix.

537


What is rmdir command?

546


Are you in or at the office?

609






When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1758


What do chmod command do?

600


What does touch command do in unix?

721


What is the use of awk command in unix?

574


Using unix command how to display no of records in oracle?

602


What is the use of cut command in unix?

688


How can we use grep command in unix?

608


Is grep faster than awk?

555


What is merge command in unix?

940


What is the general format of unix command syntax?

687