Sponsored Links

Interview Questions



INTERVIEW QUESTIONS OPERATING SYSTEMS LINUX DETAILS

Question: You have a file called phonenos that is almost 4,000 lines long. What text filter can you use to split it into four pieces each 1,000 lines long?

Answer: Answer: split

The split text filter will divide files into equally sized pieces. The default length of each piece is 1,000 lines.

Category Linux Interview Questions & Answers - Exam Mode / Learning Mode
Rating (0.3) By 6808 users
Added on 12/11/2009
Views 71359
Rate it!

Question: You have a file called phonenos that is almost 4,000 lines long. What text filter can you use to split it into four pieces each 1,000 lines long?

Answer:

Answer: split

The split text filter will divide files into equally sized pieces. The default length of each piece is 1,000 lines. Source: CoolInterview.com



split -l phonenos new
or
split -l 1000 phonenos new

would split the file "phonenos" into files beginning with the name "new" like newaa, newab ,newac and newad
Source: CoolInterview.com

Answered by: Arvind | Date: 9/26/2009 | Contact Arvind Contact Arvind


If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification Enter the above shown code: *
Inform me about updated answers to this question

Related Questions
View Answer
You wish to print the file vacations with 60 lines to a page. Which of the following commands will accomplish this?
Choose one:

a. pr -l60 vacations | lpr
b. pr -f vacations | lpr
c. pr -m vacations | lpr
d. pr -l vacations | lpr
View Answer
What would be the result of the command paste -s dog cat?
Choose one:

a. The corresponding lines from the files dog and cat would be pasted together separated by a tab.
b. The corresponding lines from the files dog and cat would be pasted together separated by a space.
c. The file cat would be pasted after the file dog.
d. The file dog would be pasted after the file cat.
View Answer
What text filter can you use to display a binary file in octal numbers?
View Answer
What text filter can you use to display a multi-page file and place numbers at the beginning of each line.
View Answer
You have two files each ten lines long. What text filter could you use to combine the two files so that each line of the output contains the corresponding line from each file?
View Answer
You issue the command head *. What would the resulting output be?
Choose one:

a. The first ten lines of each file in the working directory would be displayed preceeded by the file's name.
b. The first five lines of each file in the working directory would be displayed preceeded by the file's name.
c. The name of each file in the working directory would be displayed.
d. The first ten lines of each file in your home directory would be displayed preceeded by the file's name.
View Answer
You want to print out a text file called vacations however the lines are of varying length. What text filter could you use to even out the length of the lines?
View Answer
You have a tab delimited file called phonenos and want to change each tab to four spaces. What command can you use to accomplish this?
Choose one:

a. expand -t4 phonenos
b. expand phonenos
c. expand -n4 phonenos
d. expand -t phonenos
View Answer
You have a file called phonenos that consists of two fields per line, telephone number and name, with the fields being separated by a comma (,). You want to have a list of the names only. Which command will accomplish this?
Choose one:

a. cut -d, -f2 phonenos
b. cut -d, -f1 phonenos
c. cut -d -f2 phonenos
d. cut -f2 phonenos
View Answer
You have a file named phonenos containing names and telephone numbers. Each line contains the telephone number followed by the name. You want to sort the file by telephone number in ascending order. Which of the following commands will accomplish this.
Choose one:

a. sort phonenos
b. sort -c phonenos
c. sort -n phonenos
d. sort -r phonenos
View Answer
When using sed to replace one term with another it will print every line in the file and then print each line every time it does a replacement. What option should you add to the command line to only print the lines that are changed?
Choose one:

a. -n
b. -p
c. -g
d. -f
View Answer
Which of the following commands will replace all occurrences of the word rate with the word speed in the file racing?
Choose one:

a. sed s/rate/speed/g racing
b. sed -n s/rate/speed/ racing
c. sed s/rate/speed/ racing
d. sed s2/rate/speed/ racing
View Answer
Your default umask is 002. What does this mean?
Choose one:

a. Any file you create will have the permissions set as owner and group having read and write permissions; others as read only.
b. Any file you create will have the permissions set as owner and group having read, write and execute permissions; others as read and execute.
c. Any directoy you create will have the permissions set as owner and group having read, write and execute permissions; others as read and write permissions.
d. Any directory you create will have the permissions set as owner and group having read and write permissions; others as read only.
View Answer
What is meant by sticky bit?
Choose one:

a. When set on a directory, then only the owner of a file can delete it.
b. When set on an executable, then any user can run the executable.
c. When set on a file, only the owner can see the file in a directory listing.
d. When set on a directory, then everyone has read, write and execute
permission on the files contained in that directory.
View Answer
You have a file with permissions set as
-rw-r--r-- 1 root admin 7202 Sep 17 9:10 phonenos
What would be the effect of issuing the command chmod 4755?

Choose one:
a. The owner would be given execute permission.
b. To run the file you will have to give root's password.
c. When executing the file phonenos it would be run under the same permissions as the owner's.
d. Everyone would have the write permission to the phonenos file.
View Answer
You have a file with the following permissions
-rw-r--r-- 1 root admin 7202 Sep 17 9:10 phonenos
You want the members of the admin group to be able to modify the file. What command should you use?
Choose one:

a. chmod 664 phonenos
b. chmod 114 phonenos
c. chmod 771 phonenos
d. chmod 551 phonenos
View Answer
You have a directory with the following permissions
drw-rw--w- 1 root admin 7202 Sep 17 9:10 administration
and need to give everyone except root read only access to it. Which of the following commands will accomplish this?
Choose one:

a. chmod uo=r administration
b. chmod ug+r administration
c. chmod uo+r administration
d. chmod ug=r administration
View Answer
You copy the administration directory to George's home directory.
-rw-rw--w- 1 root admin 7202 Sep 17 9:10 administration
The only group that George is a member of is users. He calls you to say he cannot list the contents of the administration directory. Why can't he look at its contents since it is in his home directory?
Choose one:

a. In order to view the contents of a directory, you must have read permission. George only has write permission.
b. Only the owner of a directory can list its contents.
c. George needs to change his default group to admin.
d. George needs to make himself the owner of the administration directory.
View Answer
You have a file called administration with the following attributes
-rw-rw-r-- 1 root admin 7202 Sep 17 9:10 administration
George is a member of the admin group and Bob is a member of the sales group. Both George and Bob need to make changes to this file. What permissions do George and Bob have to the file?
Choose one:

a. George has read and write permissions and Bob has read permission.
b. Bob has read and write permissions and George has read permission.
c. Both George and Bob have read and write permissions.
d. Both George and Bob have read permission only.
View Answer
A listing of the /data directory shows
drw-rw-r-- 1 root accounting 17249 Sep 7 10:08 accounting
drw-rw-r-- 1 root admin 7202 Sep 17 9:10 administration
drw-rw-r-- 1 root humres 13367 Sep 1 12:58 humres
drw-rw-r-- 1 root sales 9449 Sep 22 7:34 sales
George, who is a member of the admin group, attempts to delete a file contained in the humres directory but is unsuccessful. What do you and George need to do to allow George to delete files in this directory?
Choose one:

a. You need to add George to the humres group then George needs to make the humres group his default group.
b. You need to edit the /etc/passwd file to show the humres group as George's default group.
c. Give George ownership of the humres directory.
d. George needs to give you a list of files to be deleted and then you should delete them.
View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All Linux Interview Questions & Answers - Exam Mode / Learning Mode



User Options
India News Network

Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal



Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |




Copyright ©2003-2024 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions