Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

if we create a file, in that 10 rows(means 1,2,....9,10
like). i want 7 row exactly, which command use in unix?
plz send this question.

Answer Posted / niranjan

To display first 7 lines of file:-

1) head -7 filename

2) cat filename|head -7



To display only 7th line of file:-

1) head -7 filename|tail -1

2) cat filename|head -7|tail -1

3) tail +7 filename|head -1

choice is ur's..Which one u feel looks gud...:):):)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the nmap command?

1149


What is the command to find maximum memory taking process on the server?

1174


What is unix command?

1221


What is ‘ps’ command for?

1154


What is grep and how do you use it?

1076


What is merge command in unix?

1462


what is the advaantage of each user having its own copy of the shell?

2522


Which command can you use to find the currently running process in unix server?

1092


What command will change your prompt to myprompt?

1279


What difference between cmp and diff commands?

1275


What are awk commands?

1119


Which command is used to copy files?

1141


Which command is used to restrict incoming messages?

1063


Which command should you use to find the remaining disk space in unix server?

1269


Which command is used to create a directory?

1121