ODESK uPwork Unix SKILLS TEST CORRECT ANSWER 2015
What is the default standard error file?
a. err
b. error
c. stderr
d. errfile
e. errdev
What is the user id of a root user?
a. 0
b. 1
c. 2
d. 3
Which of the following commands can be used to see the detailed
information on how to use a particular command?
a. $ man
b. $ show
c. $ details
d. $ help
UNIX offers the following benefits:
a. Time-sharing
b. Multi-tasking
c. Multi-programming
d. a and b.
e. a,b and c.
Which of the following characters can be used to run multiple
commands on a single line?
a. /
b. :
c. ,
d. ;
Which of the following statements is not true regarding UNIX?
a. The kernel does not incorporate a command interpreter.
b. There can only be one command interpreter.
c. UNIX uses a utility program
called the shell to provide the user interface.
d. The shell includes features
such as interactive processing and background processing.
e. There are various kinds of
shells.
In UNIX , shell is a program which :
a. reads a command line from the standard input and interprets it according to a fixed set of rules.
b. is a framework into which
functions or utilities can be added when required.
c. is the interface between the
user and the kernel.
d. a and b.
e. a and c.
A single command which lists all files in a directory,
distinguishing between a directory, executable and symbolic link files is:
a. ls -l
b. ls -F
c. ls -o
d. ls -r
e. ls -h
The command
ls | more
displays a list of:
ls | more
displays a list of:
a. all the files in the current directory
b. all the files in the current
directory one line at a time
c. all the files in the current directory one screen at a time
d. all the files in the current
directory and then waits for the next command
e. all the files in all the
directories.
You have two variables, v1 and v2. You want to assign the value of
v2 to v1.Which of the following declarations is correct?
a. v1=v2
b. v1=$v2
c. v1=${v2}
d. a or b.
e. b or c.
Which of the following statements is incorrect regarding the UNIX
environment?
a. It has the provision of security through the login and password programs.
b. In it the file names are not
case insensitive.
c. It has the provision of
various commands and utilities for file and directory manipulation.
d. It does not allow relative
path names.
e. It allows the use of
wild-card characters for file-name expansion
The command
rm -r project
rm -r project
a. deletes the file project from the current directory.
b. deletes all the files from
the directory project.
c. recursively deletes the
directory project and all its subdirectories.
d. deletes the file project
found in all directories.
e. is invalid.
Which file contains the commands that the system executes when a
user logs in?
a. $HOME/startup
b. user/init
c. $HOME/.profile
d. etc/startup
Which command would you use if you want to display selective
fields from a file?
a. pg
b. wc
c. tr
d. cut
e. tee
The UNIX command
a.out &
runs the program a.out:
a.out &
runs the program a.out:
a. With highest priority
b. With highest speed
c. Only when no other process
is running on the system
d. In the background
e. Is invalid
Which of the following is not a filter?
a. sort
b. grep
c. uniq
d. pg
e. echo
Which wild-card matches one character?
a. *
b. -
c. #
d. ?
e. @
Which option of the sort filter folds lower case characters to
upper case?
a. -r
b. -f
c. -n
d. -t
e. -o
What communication command allows a user to communicate with
another user logged on by splitting the screen and providing two way
communication?
a. talk
b. write
c. chat
d. talkto
e. transmit
Which command is used to run a command at a specified time?
a. timer
b. at
c. time
d. atq
e. dd
Consider the following command
cat re*
Which of the following files will not be displayed by this command?
cat re*
Which of the following files will not be displayed by this command?
a. reminder
b. receipt
c. Receipt
d. recipe-cake
e. re.c
The PID of a process is displayed by the command:
a. ps
b. p
c. pid
d. pd
e. pc
The main objective of a time-sharing operating System like UNIX is
to:
a. Minimize the net execution time.
b. Maximize the processor
utilization.
c. Minimize the user response
time.
d. Minimize the number of
instructions required for a process.
e. Minimize the end user's
involvement required for a task.
Which command enables you to concatenate files?
a. cp
b. mv
c. concat
d. ls
e. cat
What communication command provides communication to another user
logged on by writing to the bottom of their terminal?
a. talk
b. write
c. chat
d. talkto
e. transmit
Pipes is/are:
a. special programs that prevent the system from crashing.
b. disk management utilities.
c. memory management utilities.
d. a special feature by which
the standard output of a command or user program can be sent as the standard
input to another command or user program
e. special channels for high
speed data transfer.
The executable file name for the Bourne shell is:
a. bsh
b. sh
c. csh
d. ksh
e. lsh
Which of the following commands will you use to send the contents
of a file named abc to a user named Raven by mail?
a. mail raven>abc
b. mail raven<abc
c. mail raven<<abc
d. mail raven abc
Point out the incorrect statement regarding standard input , output
and error :
a. The terminal is the standard source for input and the standard output and
standard error destination for most UNIX commands.
b. All data sources and
destinations are treated as files in UNIX.
c. The three standard files
have a file descriptor
0 - standard output file
1 - standard input file
2 - standard error file
0 - standard output file
1 - standard input file
2 - standard error file
d. The input , output and error
output can be redirected to a file other than the standard file using file
descriptors and the > or < symbol.
e. The output and error can be
redirected in the append mode to add the redirected output or error to an
existing file using the >> symbol.
Which type of users can be associated with each file in UNIX?
a. The file owner.
b. The group owner of the file.
c. Other users who are not part
of the group.
d. a and b.
e. a,b and c.
The command to restore files and directories from magnetic tape
is:
a. tar -xv
b.
tar -tv
c.
tar -cv
d.
tar -td
e.
tar -uv
Which option used along with find prompts the user for
confirmation before any operation is performed on a file?
a. -name
b. -type
c. -ok
d. -exec
e. -mtime
The wc filter:
a. counts the number of words in a disk file or in the standard input
b. counts the number of
characters in a disk file or in the standard input
c. counts the number of lines in a disk file or in the standard
input
d. can only be used with one
file at a time
Consider the following file
listing of file abc1 for a user abc
-rw------- 1 abc student 10 jan 10:39 abc1
What inference would you make regarding the file access permissions?
-rw------- 1 abc student 10 jan 10:39 abc1
What inference would you make regarding the file access permissions?
a. The group have full permissions.
b. Only the owner has full
permissions.
c. Only the owner has read and write but no execute permissions.
d. The group has read and write
permissions.
e. Others have read and write
permissions.
What is the number of fields in each line in /etc/passwd file?
a. 3
b. 4
c. 5
d. 6
e. 7
Which command prints the current working directory?
a. pwd
b. cd
c. ls
d. mv
e. cp
You want to read through the reference manual. What command will
you use?
a. assist
b. help
c. reference
d. aid
e. man
Which command will symbolically link two files in a directory?
a. link f1 f2
b. link -s f1 f2
c. ln f1 f2
d. ln -s f1 f2
e. ln -l f1 f2
UNIX is an example of:
a. Batch processing operating system.
b. Time sharing operating system.
c. Real time sharing system.
d. Single user operating
system.
e. Assembly language.
Which command is used by a user to define a printer for their
session?
a. Using lpdest environmental variable
b. Using spooler command
c. Using lpadmin command
d. Using printf command
Which character of the grep filter specifies that the pattern
preceding it must occur at the end of each line?
a. []
b. ^
c. $
d. .
e. \
What will be the result of command '' rm -r directory/* ''?
a. It will remove the directory and all the files present in that directory
b. It will remove all the files
but not the directory
c. It will show an error
message
d. None of the above
By which command can you move to a different directory?
a. pwd
b. cd
c. ls
d. mv
e. rm
Which of the following statements is incorrect?
a. UNIX has a facility by which the user can start a task and then proceed to work on other tasks while the system runs the first task in the background and the second task in the foreground
b. UNIX has numerous utility
programs for various functions. New utilities can be built effortlessly by
combining existing utilities
c. UNIX is not portable from
one hardware platform to another
d. UNIX was the first operating
system to introduce the concept of a hierarchical file system
e. UNIX offers an excellent
variety of tools for software development for all phases, from program editing
to maintenenance of software
Which UNIX command provides the type of information contained in a
particular file?
a. more filename
b. type filename
c. file filename
d. info filename
e. list filename
The file descriptor of stdin is:
a. 0
b. 2
c. 3
d. 10
e. 20
Which of the following files is configured for login name, login
directory and login shell variables?
a. /etc/profile
b. /etc/home
c. /etc/passwd
d. /etc/conf
Point out the incorrect statement regarding standard input, output
and error :
a. The terminal is the standard source for input and the standard output and standard error destination for most UNIX commands.
b. All data sources and
destinations are treated as files in UNIX.
c. The three standard files
have a file descriptor 0 -
standard output file 1 -
standard input file 2 - standard
error file
d. The input , output and error output can be redirected to a file
other than the standard file using file descriptors and the > or <
symbol.
e. The output and error can be
redirected in the append mode to add the redirected output or error to an
existing file using the >> symbol.
Which of the following commands can be used to view the calendar
of April 2007?
a. $ cal april 2007
b. $ cal april 07
c. $ calendar 4 07
d. $ cal 4 2007
You want to search for the pattern "Newa" or
"Newb" or "Newc". Which regular expression will you use
with the grep command?
a. "New[abc]"
b. "New[a-c]"
c. "New[^abc]"
d. a or b.
e. b or c.
Which option of the sort filter changes the output to reverse
order?
a. -r
b. -f
c. -n
d. -t
e. -o
How can a root user find the password of a user who has forgotten
his password?
a. By looking in the etc/passwd
b. By using passwd command
c. It is not possible
d. None of the above
Which command is used for splitting a file horizontally?
a. cut
b. head
c. tail
d. b and c
e. a, b and c
What option of the sort filter would you use if you want to save
the output on a disk file?
a. -r
b. -f
c. -n
d. -t
e. -o
Which of the following statements is incorrect regarding
variables?
a. Variables have no data type.
b. Variables can be local or global.
c. Variables can be created at
the $ prompt or within a shell script.
d. Global variables are created by the global command.
e. Environment variables are
created by the shell.
The find command :
a. searches for specific patterns of characters in file.
b. is used for locating words
in a file.
c. Is used to locate files in a
directory and in all subdirectories of that directory.
d. can only be used by the
administrator.
e. is used for locating users
in a network.
What would be displayed on the screen if the pwd command is
entered when the user is working in the user directory?
a. /
b. home
c. /home/username
d. usr/
e. usr>
f. usr/username
Which of the following is incorrect about the restrictions imposed
by the restricted shell?
a. The user cannot move out of the current working directory.
b. The user cannot change the path; execution of programs in
directories other than those authorised by the system is prevented.
c. The user cannot specify
absolute path-names beginning at the root.
d. The user cannot redirect
input or output.
e. The user is not allowed to
see the listing of files in his working directory.
You are writing a shell script. For a given condition, you want to
terminate a loop. Which command will you use?
a. terminate
b. end
c. break
d. stop
e. exit
Who can change the password of a user account?
a. Administrator
b. The root user
c. All the members of the
Administrator group
d. Account owner
Highlight the incorrect statement regarding the uniq command:
a. uniq is a filter.
b. It compares adjacent lines in a sorted file.
c. It can display lines that
are unique.
d. It can display lines that
are repeated.
e. It automatically sorts the
file that is specified.
Which command would make the scope of a shell variable global to
the subshells?
a. global
b. export
c. scope
d. grant
e. extend
What is the number of standard file pointers in UNIX?
a. 3
b. 4
c. 5
d. 6
e. 7
The command
rmdir c-prog
will not work if :
rmdir c-prog
will not work if :
a. c-prog is not empty.
b. c-prog is the current
working directory.
c. full pathname is specified
with rmdir.
d. a and b.
e. a and c.
Which keystroke combination sends or signals an interrupt request
to a process?
a. Ctrl+c
b. Ctrl+d
c. Ctrl+u
d. Ctrl+s
e. Ctrl+q
By which command a user can add a password for his login name?
a. passwd
b. pass
c. chpass
d. password
e. setpass
Which filter will you use to translate a set of charaters to
another?
a. grep
b. cut
c. tr
d. wc
e. tee
The command to restore files and directories from magnetic tape
is:
a. tar -xv
b.
tar -tv
c. tar -cv
d.
tar -td
e.
tar -uv
You want to make a new directory. What command will you use?
a. md
b. makedir
c. mkdir
d. dirmake
e. newdir
Which command invokes a text editor?
a. write
b. edit
c. editor
d. pad
e. vi
Which of the following commands can be used to add the read and
write permissions to the user and group classes of a file named abc?
a. chmod ugo +rw abc
b. chomd abc ug -rw
c. chmod ug -rw abc
d. chmod ug+rw abc
What is the file descriptor for the standard error file?
a. 0
b. 1
c. 2
d. 3
e. 4
Which command will you use to see the available routes and their
status?
a. show route
b. route status
c. netstat -rn
d. None of the above
Which option of the grep filter prints out all those lines that do
not match the pattern specified by the regular expression?
a. -n
b. -c
c. -d
d. -l
e. -v
The user passwords are kept in which file on most Unix systems?
a. /etc/passwd
b. /etc/password
c. /usr/password
d. /bin/passwd
e. /system/password
The command to take a backup of files and directories on magnetic
tape is:
a. tar -xv
b. tar -tv
c. tar -cv
d. tar -td
e .tar -uv
You want to specifically search for the character [ . What
character(s) would you use in the expression to achieve this?
a. []
b. ^
c. .
d. \
e. $
Which variable contains the system prompt?
a. PS1
b. PATH
c. PROMPT
d. HOME
e. LOGNAME
The shell variable that defines internal field separator is.
a. PS1
b. PATH
c. HOME
d. LOGNAME
e. IFS
Which command gives all differences between two files?
a. filecmp
b. filecompare
c. filediff
d. diff
Which of the following locations store the information about the
currently installed Software on a local system?
a. /var/adm/sw/install
b. /var/adm/sw/software
c. /var/adm/sw/recent
d. /var/adm/sw/products
Suppose you have a file named trans and you want to display fields
two to four. Which of the following commands will you use?
a. cut -f4-2 trans
b. cut -f2,3,4 trans
c. cut -f2-4 trans
d. a or b.
e. b or c.
Which special variable will display the exit status of the last
executed command in Bourne or Korn shell?
a. $#
b. $-
c. $?
d. $$
e. $!
Which command will delete a directory only if it is empty?
a. rmdir
b. rmdir -r
c. rmdir -e
d. rmdir -t
e. rmdir -u
What is the file descriptor for the standard output file?
a. 0
b. 1
c. 2
d. 3
e. 4
Which of the following statements is not true regarding the grep
filter?
a. It is used to search a file for a particular pattern of characters and displays all lines that contain that pattern.
b. The pattern that is searched
for in the file is referred to as the regular expression.
c. grep can be used without
specifying a regular expression.
d. The filenames are
optional.In this case grep expects standard input.
e. The -c option prints only a
count of the lines that match the pattern.
Which option of the uniq command would you use to display only
those lines which have a multiple occurrence?
a. -u
b. -d
c. -c
d. -l
e. -r
Study the following statements and select the incorrect one :
a. UNIX files assume all data to be consisting of streams of bytes.
b. UNIX commands use the system
calls for their operations.
c. UNIX adopts a priority based
scheduling strategy.
d. UNIX process priorities
cannot be changed by the user.
e. The UNIX system call signal is used to handle interrupts.
No comments:
Post a Comment