Question1
Which of the following is true?
- Both user and superuser can execute the executable file etc/cron
- Only user can execute the executable file etc/cron
- Only superuser can execute the executable file etc/cron
- Neither the user nor the superuser can execute the executable file etc/cron
Question 2
What is the output of the following command?
ls | grep '^d' | wc -l
- Gives a count of all the files starting with the word d
- gives a count of all the files except the files starting with the word d
- gives a count of all the files in present directory
- syntax error
Question 3
What is the output of the following code
A=$1
B=$2
for i in $A
do
mv $i ${i}$B
done
if the arguments passed are
test *5t
- test*
- test*5t
- testtest*5t
- syntax error
Question 4
Default status permission for a file is set based on
- chmod
- Owner
- umask
- Group
Question 5
For setting environment variables in Unix which of the following files do you edit
- .profile
- .exrc
- .login
- None of the above
Question 6
To compile program in Unix having mathematical library functions, we need to
- include math.h
- include stdlib.h
- cc filename -lm
- Both A and C
Question 7
What happens if the following command is executed?
At 12:00 am Jan 1
Echo "happy New Year"
- Syntax error
- At 12:00 am on January 1, displays the message happy new year on the terminal
- At 12:00 am on January 1, the following message is mailed by cron
- Incorrect usage of at command
Question 8
To list the files in a directory, we need to have
- Write permission to the directory
- Read permission to the directory
- Execute permission to the directory
- Both A and B
Question 9
Which one among the following is a filter command?
- ls
- awk
- vi
- None of the above
Question 10
What happens if you don't redirect the output to the terminal, when using at command
- It would throw a syntax error
- It would be mailed to us by the cron
- It would throw an error stating improper usage of the at command
- Nothing, because by default it would be redirected to the terminal
Question 11
Which of the following provides information regarding which users are allowed and which users are disallowed from using the at command
- at.deny and at.allow
- at.allow and at.disallow
- at.deny and at.show
- All of the above
Question 12
Which command would you use to find out how much time is required to execute a particular process?
- time
- nice
- who
- ps
Question 13
Using the kill command which of the following processes cannot be killed?
- sched
- vhand
- nice
- Both A and B
Question 14
The correct way to search for a pattern in a file one, sort that file and file called two and write the contents of the sorted files to a new file called three is
- grep test one | sort - two > three
- grep test one | sort cat two > three
- grep test one | sort one | sort two > three
- All of the above
Question 15
How can you say that a particular command is a filter or not?
- If the command takes only input from the standard input
- If the command send only output to the standard output
- If the command takes input form the standard input and it sends its output to the standard output
- All of the above
Question 16
Which of the following files do you edit for setting the path in Unix
- .exrc
- .profile
- .login
- None of the above
Question 17
Which of the following shell variable would change the existing prompt to your name?
- PS1
- PS2
- PATH
- HOME
Question 18
What is the output of the following program?
echo "Enter your name"
read name
t=`expr $name | wc -c | bc`
echo "The length of the given string is $t"
if the input given is "this is a test from genesis"
- 5
- 28
- 22
- Syntax error
Question 19
How to compile a list a files given as command-line arguments, and if they are complied successfully how do we run them?
- cc $* || a.out
- cc $* && a.out
- cc $* -a a.out
- cc $* -o a.out
Question 20
If the grep command is successful in finding a pattern, it returns a exit status of
- 0
- 1
- 2
- 3
Answers
Answer 1 - D
Answer 2 - A
Answer 3 - B
Answer 4 - C
Answer 5 - B
Answer 6 - D
Answer 7 - C
Answer 8 - C
Answer 9 - B
Answer 10 - B
Answer 11 - A
Answer 12 - A
Answer 13 - D
Answer 14 - A
Answer 15 - C
Answer 16 - B
Answer 17 - A
Answer 18 - D
Answer 19 - B
Answer 20 - A
No comments:
Post a Comment