Deck 2: Unix Commands and Functions: Part A
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 2: Unix Commands and Functions: Part A
1
The command cal j 1997 would give the output as
A)the calendar of jan, june and july 1997
B)only calendar of jan 1997
C)an error
D)none of the above
A)the calendar of jan, june and july 1997
B)only calendar of jan 1997
C)an error
D)none of the above
an error
2
The output of command banner "Unix shell programming" would be
A)a banner showing 'unix','shell' and 'programming' words displayed in separate lines
B)a banner showing 'unix shell' in one single line
C)nothing
D)a banner showing 'unix shell programming' in one line.
A)a banner showing 'unix','shell' and 'programming' words displayed in separate lines
B)a banner showing 'unix shell' in one single line
C)nothing
D)a banner showing 'unix shell programming' in one line.
a banner showing 'unix shell' in one single line
3
To see the last access time of various files in a file system the command is
A)is-iu
B)is-i
C)is-acc
D)is-mt
A)is-iu
B)is-i
C)is-acc
D)is-mt
is-iu
4
To ascertain what are the contents of the file in your the system the best way would be
A)do a cat command on each file and find its contents
B)use the command cat*
C)use the command file*
D)none of the above
A)do a cat command on each file and find its contents
B)use the command cat*
C)use the command file*
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
Which of these is not a command of Unix related with DOS
A)dosdir a:proj
B)doscopy trial a:/
C)doscp/home/proj/prg a:/
D)dosls
A)dosdir a:proj
B)doscopy trial a:/
C)doscp/home/proj/prg a:/
D)dosls
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Which of following commands do not belong to multiple file editing commands
A):n!
B):q!
C):rnew!
D)all the above
A):n!
B):q!
C):rnew!
D)all the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
The difference between the commands ps -e and ps -a is
A)ps -e gives details of every process running in memory whereas ps -a gives output for all the process that you have launched
B)ps -e gives details of every process running in memory whereas ps -a gives details of all user processes
C)no difference , both give same output
D)none of the above
A)ps -e gives details of every process running in memory whereas ps -a gives output for all the process that you have launched
B)ps -e gives details of every process running in memory whereas ps -a gives details of all user processes
C)no difference , both give same output
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
The father of all processes is
A)root
B)sh
C)sched
D)init
A)root
B)sh
C)sched
D)init
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
The process id numbers of the processes vhand,bdflush,sched and init are
A)1,2,3 and 4
B)2,3,0 and 1
C)3,4,1 and 2
D)0,1,2 and 3
A)1,2,3 and 4
B)2,3,0 and 1
C)3,4,1 and 2
D)0,1,2 and 3
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following is not true regarding the command $ nohup cat *.let | nohup sort >f1 &
A)the process would die if the user logs out before the command's execution is over
B)if the user logs out the output of sort would be dtored in a file nohup.out
C)it is optional to give nohup before sort
D)this background process is also known as a deamon process
A)the process would die if the user logs out before the command's execution is over
B)if the user logs out the output of sort would be dtored in a file nohup.out
C)it is optional to give nohup before sort
D)this background process is also known as a deamon process
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following is not true regards the kill command
A)super user can kill deamon processes
B)for sure kill the signal no is 9
C)there is no surety that the shell process will get killed by the command kill
D)using kill command you can kill other user's processes too
A)super user can kill deamon processes
B)for sure kill the signal no is 9
C)there is no surety that the shell process will get killed by the command kill
D)using kill command you can kill other user's processes too
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following is not true
A)the at command permits you to receive messages only by mail
B)a person's login name appears in the file at.allow if he is not allowed to use the at command
C)both are false
D)both are true
A)the at command permits you to receive messages only by mail
B)a person's login name appears in the file at.allow if he is not allowed to use the at command
C)both are false
D)both are true
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
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
A)message -on
B)msg -o
C)mesg -y
D)message-y
A)message -on
B)msg -o
C)mesg -y
D)message-y
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
The command that unix offers to a user to find out whether he can send messages to a particular terminal are
A)finger and who
B)finger -mesg and who -t
C)finger -i and who -t
D)finger -i and who -t.
A)finger and who
B)finger -mesg and who -t
C)finger -i and who -t
D)finger -i and who -t.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
If the user has read a news item he cannot read it again because of creation of the file
A)_news_time
B)news.time
C).news.time
D).news_time
A)_news_time
B)news.time
C).news.time
D).news_time
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
To read the stale news the option available is
A)news -a
B)delete the file /usr/news
C)delete the file _news.time
D)delete the file .news_time
A)news -a
B)delete the file /usr/news
C)delete the file _news.time
D)delete the file .news_time
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
The message of the day is stored in a file called
A)/etc/profile
B)/etc/motv
C).profile
D)autoexec.bat
A)/etc/profile
B)/etc/motv
C).profile
D)autoexec.bat
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
The incoming mail of user with the login name aa12 is stored in the file
A)/usr/spool/mail/aa12
B)/usr/aa12/mbox
C)/spool/mail/aa12
D)/usr/aa12/.mbox
A)/usr/spool/mail/aa12
B)/usr/aa12/mbox
C)/spool/mail/aa12
D)/usr/aa12/.mbox
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
.mailrc is the file
A)which stores the incoming mail
B)which is used to type the mail to be sent
C)which is invoked when the mail command is executed
D)which permits you to customize the vi environment
A)which stores the incoming mail
B)which is used to type the mail to be sent
C)which is invoked when the mail command is executed
D)which permits you to customize the vi environment
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
The escape sequence \033[4m is used to
A)underlying characters
B)mark them as bold
C)display them in reverse video
D)none of the above
A)underlying characters
B)mark them as bold
C)display them in reverse video
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following assignments is illegal
A)a='ls'
B)b='ls -l'
C)c='1972'
D)d='who | grepaal'
A)a='ls'
B)b='ls -l'
C)c='1972'
D)d='who | grepaal'
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following assignment is illegal
A)a='cat file'
B)a=100 b=50
C)age=25
D)all the above
A)a='cat file'
B)a=100 b=50
C)age=25
D)all the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
A null variable a can be created using
A)a=
B)a=''
C)a=""
D)all the above
A)a=
B)a=''
C)a=""
D)all the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
The shell metacharacter $# represents
A)total number of arguments supplied to the shell script
B)total number of files in the current directory
C)total number of users who have logged in
D)total number of processes running in the background
A)total number of arguments supplied to the shell script
B)total number of files in the current directory
C)total number of users who have logged in
D)total number of processes running in the background
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
When we are executing a shell script the shell acts as
A)an interpreter
B)a compiler
C)an operating system
D)none of the above
A)an interpreter
B)a compiler
C)an operating system
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck