Sign In
Sign In
Reset Password
Register
Home
Courses | Fees
Unix
Unix Linux Fundamentals
Unix Shell Scripting
Korn/Bash shell scripting
Red Hat
Red Hat® Certified System Administration (RHCSA)
Red Hat Certified System Administration
Red Hat® Enterprise Clustering and Storage Management (RH436)
Red Hat® Enterprise Virtualization (RH318)
Red Hat Linux Performance Tunning
Contact Us
Home
Courses | Fees
Unix
Unix Linux Fundamentals
Unix Shell Scripting
Korn/Bash shell scripting
Red Hat
Red Hat® Certified System Administration (RHCSA)
Red Hat Certified System Administration
Red Hat® Enterprise Clustering and Storage Management (RH436)
Red Hat® Enterprise Virtualization (RH318)
Red Hat Linux Performance Tunning
Contact Us
Unix Shell Scripting | Bash Shell Scripting
Unix Skill Test | Unix Shell Scripting Quiz 3 For Advance User
Register to attempt quiz.
1
Which one won't remove the file Wal*Mart?
rm 'Wal*Mart'
rm 'Wal\*Mart'
rm Wal*Mart
rm Wal\*Mart
2
Which one is not equivalent to wc < in > out?
< out wc > in
> out wc < in
wc > out < in
< in wc > out
3
Which command is used to break the output in two streams?
tar
tr
tail
tee
4
You want to concatenate two files, a and b, but also insert some text in between from the terminal. How will you do this?
cat - a b > c
cat - a b > c
cat a - b > c
cat a b - > c
5
How do you show lines 5 to 10 of the file {tt foo}?
tail +5 foo | head
tail +10 foo | head -5
head foo | tail +5
head -5 foo | tail +10
6
How will you find out the lines common to two sorted files?
comm -12 foo1 foo2
cmp -12 foo1 foo2
comm -23 foo1 foo2
cmp -23 foo1 foo2
7
How do you know how many different users are logging into the system?
who | uniq | sort | wc -l
who | cut -d' ' | uniq | wc -l
who | sort | uniq | wc -l
who | cut -d' ' | uniq -d | wc -l
8
How do you remove duplicate lines from the file foo using sort?
sort -d foo
sort -u foo
sort -n foo
sort -p foo
9
Which system variable is used to store the PID of the current shell?
$$
$!
$%
%$
10
How do you find out the complete command line of a process run by user romeo?
ps -a -u romeo
ps -d -u romeo
ps -e -u romeo
ps -f -u romeo
11
Which one will you use to make sure that a process is killed?
kill -7
kill -8
kill -9
kill -10
12
Which command can you use to schedule a job?
cal
schedule
set
at
13
Which command reveals details of users?
w
finger
who
detail
14
When using ftp, how do you list files in your local directory?
lls
!ls
lcd
!cd
15
If a script is run as foo -l -t bar[1-4], what is the value of $#?
3
4
5
6
16
Which one is the here document?
<<
>>
<1
>1
17
To debug shell script, what is put into the beginning of the script?
set -dg
set -u
set -x
set -w
18
When you look for a pattern in files ignoring case which one will you use?
grep -v
grep -i
grep -l
grep -e
19
Which command has the same result as head -3?
tail +3
sed '3d'
sed '3p'
sed '3q'
20
If x has the value 10, what is the value of x$x$?
x10$
1010
10x$
x$10
21
Which special parameter indicates the name of the script?
$0
$1
$!
$*
22
What can be put into the first line of your script to make sure a script will use the Bourne shell?
#!/bin/csh
#/bin/sh
#!/bin/sh
$/bin/sh