Sponsored Links

Interview Questions



INTERVIEW QUESTIONS OPERATING SYSTEMS LINUX DETAILS

Question: 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

Answer: Answer: a

The default action of the sort utility is to sort in ascending order.

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

Question: 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


Answer:

Answer: a

The default action of the sort utility is to sort in ascending order. Source: CoolInterview.com



Correct answer c.
sorting the file based on phone no

sort -n filename
n - for numbers
Source: CoolInterview.com

Answered by: Bala | Date: 10/17/2008 | Contact Bala Contact Bala


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
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
Bob has created a new directory that will contain files that he and seven other users will be using for a new project. These eight users are the only members of the kickoff group. What does Bob need to do to give these users access to these files.
Choose one:

a. Change the group on the new directory to kickoff using the chgrp command.
b. Make each of the other seven users the owner of the files as they are created.
c. Give the others group the read and write permission to the directory.
d. Place the files in the ftp directory so each user can copy them to his own home directory.
View Answer
You copy a file to Bob's home directory that Bob needs to revise. However, when Bob attempts to open the file he is unsuccessful. What command do you need to use to give Bob ownershiop of the file?
View Answer
You issue the command ls -l memos and get the following output
-rw-rw-r-- 1 bob users 17249 Sep 7 10:08 accounting
-rw-rw-r-- 1 bob users 7202 Sep 17 9:10 administration
-rw-rw-r-- 1 root users 13367 Sep 1 12:58 humres
-rw-rw-r-- 1 bob users 9449 Sep 22 7:34 sales
Bob opens the humres file and makes changes, however, he is unable to save the file after making changes. What is the problem?
Choose one:

a. Bob is not a member of the users group and only has read access.
b. Bob's quota has been exceeded.
c. Only the owner of a file can make changes to it.
d. The file humres is corrupted and he needs to save his changes to another file.
View Answer
How does the locate and find commands differ in their method of searching?
Choose one:

a. locate uses the locatedb database and find searches the directory tree.
b. find uses the finddb database and locate searches the directory tree.
c. find searches the directory tree and the locate command only searches known directories.
d. Both locate and find searches the directory tree.
View Answer
You need to locate a file called salesdata that one of your user's created in his home directory but you do not know which one. How could you use the find command to locate this file?
View Answer
You wish to create a link to the /data directory in bob's home directory so you issue the command ln /data /home/bob/datalink but the command fails. What option should you use in this command line to be successful.
View Answer
You have two files in two different directories with the same inode. What type of link is involved?
View Answer
You have a file called salesdata and create symbolic links to it in bob's home directory. Bob calls you and says that his link no longer works. How can you fix the link?
Choose one:

a. The file salesdata has been deleted. You will have to restore it from a backup.
b. You will need to delete the symbolic link in bob's directory and recreate it.
c. Rename the link in bob's directory to salesdata.lnk.
d. Change the owner of the link in bob's directory and change the permissions to give others read and write permissions.
View Answer
You have a large spreadsheet located in the /data directory that five different people need to be able to change. How can you enable each user to edit the spreadsheet from their individual home directories?
Choose one:

a. Create a symbolic link in the /data directory.
b. Copy the spreadsheet to each user's home directory.
c. Create a hard link in each user's home directory.
d. Create a script to move the spreadsheet to which ever user's home directory who needs to edit it.
View Answer
What command should you use to check the number of files and disk space used and each user's defined quotas?
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