0% found this document useful (0 votes)
21 views12 pages

OS2

The document contains 50 multiple choice questions about Linux topics such as shell scripts, commands, permissions, file systems etc. Each question has a correct answer and the user's submitted answer. The questions cover concepts like shell variables, filters, numeric tests, file permissions, links, cron jobs and more.

Uploaded by

Kaustubh patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views12 pages

OS2

The document contains 50 multiple choice questions about Linux topics such as shell scripts, commands, permissions, file systems etc. Each question has a correct answer and the user's submitted answer. The questions cover concepts like shell variables, filters, numeric tests, file permissions, links, cron jobs and more.

Uploaded by

Kaustubh patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Q1.

Functions defined in the current shell are available to all the subshell

invoke from the current shell

Correct Answer : F

Your Answer :

QuestionID : 11325 Subject Name Linux

Q2. OPTIND and OPTARG are unix defined variables.

Correct Answer : T

Your Answer :

QuestionID : 11332 Subject Name Linux

Q3. Setting made using stty in a shell script are effective only during

the execution of the script.The orignal setting are restored the moment

excution of the script is over.

Correct Answer : F

Your Answer :

QuestionID : 11333 Subject Name Linux

Q4. we can trap a signal such that on occurence of that signal a particular

shell script gets executed.

Correct Answer : T

Your Answer :

QuestionID : 11336 Subject Name Linux

Q5. Binary executables required for system administration are usually placed in /etc.

Correct Answer : T

Your Answer :

QuestionID : 11339 Subject Name Linux

Q6. An exported variable cannot be unset


Correct Answer : F

Your Answer :

QuestionID : 11344 Subject Name Linux

Q7. To list hidden as well as normal files in thr current directory the command you would use is--

1. ls - a

2. ls - b

3. ls - l

4. None of above.

Correct Answer : 1

Your Answer :

QuestionID : 11352 Subject Name Linux

Q8. who is a special case of who am i command.

Correct Answer : F

Your Answer :

QuestionID : 11356 Subject Name Linux

Q9. While executing a script the shell acts as a compiler

Correct Answer : F

Your Answer :

QuestionID : 11365 Subject Name Linux

Q10. A PC having its own harddisk and memory continue to use them when it is acting as a terminal for a
host machine.

Correct Answer : F

Your Answer :

QuestionID : 11366 Subject Name Linux

Q11. All device related files are present in /dev directory.

Correct Answer : T
Your Answer :

QuestionID : 11373 Subject Name Linux

Q12. A kernel program is usually stored in a file called sh.

Correct Answer : F

Your Answer :

QuestionID : 11375 Subject Name Linux

Q13. Shell program is usually stored in a file called Unix.

Correct Answer : F

Your Answer :

QuestionID : 11383 Subject Name Linux

Q14. What would be the output of the following?

echo Hello

eval echo Hello

eval eval echo Hello

echo${newname+Arora}

1. Hello

Hello

2. Error

3. none of the above

4. Hello

Hello
Hello

Correct Answer : 4

Your Answer :

QuestionID : 11385 Subject Name Linux

Q15. All the utilities, applications, directories and data in Unix are stored as files.

Correct Answer : T

Your Answer :

QuestionID : 11388 Subject Name Linux

Q16. The file that controls the printer is stored in a sub-directory called printer created by system
admin.

Correct Answer : F

Your Answer :

QuestionID : 11397 Subject Name Linux

Q17. Read,write,execute permissions to a file created by you can be alter by other user

Correct Answer : F

Your Answer :

QuestionID : 11409 Subject Name Linux

Q18. How would you perform the following operations on the contents of a given file.

insert a> and a space at the start of every line in the file

1. 1,$s/^/>[][]/g

2. 1,$s/>[][]/g

3. 1,$s/^/>[]/g

4. none of the above

Correct Answer : 1

Your Answer :

QuestionID : 11410 Subject Name Linux


Q19. If in a script value of IFS is changed to : after execcution of script

the value of IFS is automatically set back to original value

1. True

2. False

3. Can not say

4. Partly True Partly False

Correct Answer : 4

Your Answer :

QuestionID : 11425 Subject Name Linux

Q20. Purpose of .exrc file is convinient way to customize the vi environment and like all

good things you shold put it to utmost use to improve your efficiency .

Correct Answer : T

Your Answer :

QuestionID : 11432 Subject Name Linux

Q21. What is the output of following program segments?

a=b

b=c d=c

echo $$b

echo $$$d

1. 521b

521c

2. 512b

512c

3. 100b

100c
4. none of the above

Correct Answer : 1

Your Answer :

QuestionID : 11441 Subject Name Linux

Q22. Unix uses serial multitasking to support various programs running in memory

Correct Answer : F

Your Answer :

QuestionID : 11463 Subject Name Linux

Q23. the command used for flip the case from upper to lower or vice versa.......

is ~

Correct Answer : T

Your Answer :

QuestionID : 11466 Subject Name Linux

Q24. echo statements output can be redirected to file

Correct Answer : F

Your Answer :

QuestionID : 11470 Subject Name Linux

Q25. Comments can be spilt over multiple lines if each line is preceded

by #

Correct Answer : T

Your Answer :

QuestionID : 11474 Subject Name Linux

Q26. to delete 5 lines from file & to copy them to buffer x we use "x5dd

Correct Answer : T

Your Answer :
QuestionID : 11479 Subject Name Linux

Q27. The following command going to do?

at 0915am Mar 24

echo "Good Morning"

ctrl d

------------------------------------------

o/p: On march 24 at 9.15 am it will print "good morning" on the screen

Correct Answer : T

Your Answer :

QuestionID : 11484 Subject Name Linux

Q28. If the printer goes out of order the system administrator can ensure that the system refuses to
accept new printing job

Correct Answer : T

Your Answer :

QuestionID : 11486 Subject Name Linux

Q29. Only system adminstrator can cancel your printing job

Correct Answer : F

Your Answer :

QuestionID : 11492 Subject Name Linux

Q30. The file /bin/sysadmsh can be executed only by the system admin.

Correct Answer : T

Your Answer :

QuestionID : 11495 Subject Name Linux

Q31. which of the following assignment is illgal

1. a=`ls`
2. b=`ls-l`

3. c=`1972`

4. d=`who|grep aal`

Correct Answer : 3

Your Answer :

QuestionID : 11496 Subject Name Linux

Q32. When fork() is given

1. It creats a child process

2. Allocate slot in process table

3. returns 0 to parent & ID to child

4. All of the above

Correct Answer : 4

Your Answer :

QuestionID : 11506 Subject Name Linux

Q33. For a person to receive messages he should have his terminal set to a parameter which will allow
him receive messages.

The command to set this parameter is

1. message -on

2. msg -o

3. mesg -y

4. message -y

Correct Answer : 3

Your Answer :

QuestionID : 11509 Subject Name Linux

Q34. we can change the prompt to What Next while using the more command

Correct Answer : F
Your Answer :

QuestionID : 11513 Subject Name Linux

Q35. The shell meta character $# represents

1. total number of arguments supplied to the shell script

2. total number of files in the current directory

3. total number of users who have logged in

4. total number of process running in the background

Correct Answer : 1

Your Answer :

QuestionID : 11518 Subject Name Linux

Q36. There is no need to make file system on a disk if we are going to use it only to back up files on it.

Correct Answer : T

Your Answer :

QuestionID : 11524 Subject Name Linux

Q37. A file system can be mounted and unmounted by any user.

Correct Answer : F

Your Answer :

QuestionID : 11527 Subject Name Linux

Q38. A floppy can be formated only by system administrator

Correct Answer : F

Your Answer :

QuestionID : 11528 Subject Name Linux

Q39. On executing a statement set -3+1

1. $1 would be -3

2. $1 would be -
3. $1 would be set

4. this command would result into an error

Correct Answer : 4

Your Answer :

QuestionID : 11540 Subject Name Linux

Q40. if there are number of file systems then each one will have its own

block

Correct Answer : T

Your Answer :

QuestionID : 11551 Subject Name Linux

Q41. A tar command is can be used to list all the backed up files present on floppy disk.

Correct Answer : T

Your Answer :

QuestionID : 11556 Subject Name Linux

Q42. Unix commands which accept the input from standard input device

and send the output to the standard output device are known as

filters.

Correct Answer : T

Your Answer :

QuestionID : 11559 Subject Name Linux

Q43. k=35

echo `[$k -eq 35 ] ``[$k-eq 50]`

1. blank line

2. dotted line

3. error
4. none

Correct Answer : 1

Your Answer :

QuestionID : 11562 Subject Name Linux

Q44. i=4 z=12

[$i=5 -a $z - gt5]

echo $?

1. 1

2. 0

3. none

4. error

Correct Answer : 1

Your Answer :

QuestionID : 11566 Subject Name Linux

Q45. To perform the numeric test we must use -ge instead of >=

Correct Answer : T

Your Answer :

QuestionID : 11572 Subject Name Linux

Q46. cat < file1 > file2

cat > file2 < file1

Both the commands will show the same result.

Correct Answer : T

Your Answer :

QuestionID : 11575 Subject Name Linux

Q47. what are the contents of the file /usr/lib/cron/at.deny ?


1. list of users who are currently logged in "at" the current instant

2. list of users who are not allowed to use the "at" command

3. both the above

4. none of the above

Correct Answer : 2

Your Answer :

QuestionID : 11582 Subject Name Linux

Q48. the if-then-fi instruction are loop control instruction

Correct Answer : F

Your Answer :

QuestionID : 11600 Subject Name Linux

Q49. A file can have links across file system.

Correct Answer : F

Your Answer :

QuestionID : 11611 Subject Name Linux

Q50. The command cut -f 2,8 -d":" file1 would output

1. the fields 2 to 8 from file1 where deliminator between fields is :

2. the fields 2 to 8 from file1 including the deliminator : between fields

3. the columns 2 to 8 from file1 with : between each column

4. none

Correct Answer : 1

You might also like