Do you know that? Find a project management application you like and stick to it. next

Contact Email: teammmrem@yahoo.com

<< All Upwork (oDesk) and Elance Tests << Elance test answers << IT & Programming category

Test answers for Unix 2020

(112) Last updated: February 28
Elance • IT & Programming
Questions and answers are regularly updated. Answered and not answered tests questions.

This helps getting job: Hundreds of (cover letter examples , interview questions , profile samples ) • Earn on Upwork (oDesk)
Job assistance: jobs popularityfreelance rates

Popular test answers: HTML, .Net, CSS, English, SEO, Photoshop, iOS, Java, Android, Ruby, Python, JavaScript

See all 6 tests answers updated

Find Upwork (oDesk) and Elance test answers on this website:



Collapse | Expand

112 Answered Test Questions:

1. You display the contents of a text file on the screen using the command:

Answers:

• print

• cat

• pr

• type

2. Files in Unix may be a representation of the system's:

Answers:

• I/O devices

• All are correct

• Terminals

• Disk drives

3. The command 'chmod -x /tmp/tmp.tmp' will:

Answers:

• sort alphabetically by entry extension the file tmp.tmp in /tmp

• load the module contained in the file tmp.tmp in /tmp, and execute it

• remove execution permission from the file tmp.tmp in /tmp

• add execution permission from the file tmp.tmp in /tmp

4. To list directories rather than their contents, in ls you use the flag:

Answers:

• -s

• -r

• -a

• -d

5. The format of a cp command is to specify:

Answers:

• first the name of the file you want to copy and then the new filename

• -i before the name of the file you want to copy (input) and -o before the new filename (output)

• -s before the name of the file you want to copy (source) and -d before the new filename (destination)

• first the new filenamen and then the ame of the file you want to copy

6. To Rename a file, you use the command:

Answers:

• id

• set

• ren

• mv

7. If your (effective) process UID is 0, you can:

Answers:

• change contents of memory locations

• all are correct

• change the nice value of processes

• send signals to processes

8. To create a directory, you use:

Answers:

• mkdir

• dir-mk

• All are correct

• md

• None are correct

9. Unix filenames are case sensitive. This is:

Answers:

• True in networked environments only

• Always true

• Always false

• True in BSD Unix only

10. On Unix, you copy a file using the command:

Answers:

• copy

• file->copy

• cat

• cp

• All of these

11. Unix has the following file/directory permissions:

Answers:

• Read, write, delete

• Read, write, change

• Read, write, execute

• Read, write, modify

12. To make a secure encrypted connection to the remote computer,  you use:

Answers:

• rsh

• ssh

• telnet

• rlogin

13. You can change your password with the command:

Answers:

• chpasswd

• passchange

• chpass

• passwd

14. If you want to verify the pathname of the directory you are currently in, you use the command:

Answers:

• path

• dir

• cwd

• pwd

15. What happens if you try to create a directory with a name that has already been used?

Answers:

• you'll be entered into a sub shell to fix the problem

• you get an error message

• the old directory will be renamed with '.bak' extension

• the directory is emptied (all files in it are deleted)

16. To become the superuser, you can can use the command:

Answers:

• chprio

• root

• superuser

• su

17. To securely copy files between computers, you use:

Answers:

• rcp

• scp

• rcs

• scs

18. When root creates a new account, by default the account password is:

Answers:

• Same as the Unix version and Revision numbers

• Same as the account name

• Same as the hostname

• There are no "default" passwords on Unix

19. The mv command:

Answers:

• moves a file to a new location

• none are correct

• copies a file to a new location and leaves a copy in the original location with the '.org' extension

• copies a file to a new location and leaves a copy in the original location

20. The search path is stored in an environment variable named:

Answers:

• SEARCHPATH

• DIRS

• PATH

• PATHS

21. If you accidentally deleted a file FFF with the 'rm FFF' command, you can restore it using:

Answers:

• undelete FFF

• rm -u FFF

• there's no way to reverse a delete operation on Unix

• the copy left in the /.recycle directory

22. To make a file ac2 executable, you use the command:

Answers:

• chgrp +x ac2

• mkexec ac2

• chmod +x ac2

• exec ac2

23. To check the Current Date and Time you use:

Answers:

• time

• date

• dd

• tr

24. In an inode, you usually will find:

Answers:

• all are correct

• The time the file's inode was last modified

• The location of the file's contents on the disk, if any

• A file reference count: the total number of names the file has

25. True or False: File names that begin with a period are called "hidden" files--that is, they are only revealed if you issue a special command.

Answers:

• False

• A period is not a valid charcter in a file name

• A period is not a valid first charcter in a file name

• True

26. The command that lists the users logged on to the system now is:

Answers:

• whoison

• who

• logged

• log

27. A hidden file is any file whose:

Answers:

• located in the directory /tmp

• first character of the filename is a '.'

• there are no hidden files in Unix

• extension is 'hidden'

28. To execute commands and programs in the background you type in the command line, they must be followed by:

Answers:

• ;

• &

• |

• @

29. What's the environment variable for your default shell?

Answers:

• $DEFAULT_SHELL

• $MYSHELL

• $SHELL

• !SHELL

• %SHELL%

30. In Unix, which of the following are not treated as files?

Answers:

• Terminals

• Directories

• Disk drives

• In Unix, everything is a file

31. To display hidden (dot) files, you use the command:

Answers:

• ls -d

• ls -a

• ls -h

• ls -H

32. When you type the name of a command, the shell finds it in:

Answers:

• list of built-in commands

• the aliases or shell functions

• the search path for an executable program or script with the given name

• all are correct

33. Which command is used to send and receive mail in Unix?

Answers:

• mailman

• outlook

• mailx

• apple

34. To temporarily change your UID, you use the command:

Answers:

• passwd

• su

• masq

• logout and login

35. If a file has the permissions "-rwxr-x---", they can be specified as an octal mode of:

Answers:

• 750

• 3640

• 463

• 570

36. To specify an absolute path, the string for the path starts with:

Answers:

• $HOME

• any valid character

• ~

• /

37. To give everybody in your group write permission to the file flog, you do:

Answers:

• chmod g+w flog

• chmod u=w flog

• chmod g-w flog

• chmod w+g flog

38. To change the file flog so people who don't belong in your group can't read it, you use the command:

Answers:

• chmod o-r flog

• chmod u=r flog

• chmod o=r flog

• chmod o+r flog

39. To refer to the parent of the current working directory, you use:

Answers:

• .

• true in SysV Unix only

• ~

• ??

• ..

40. Unix uses the N character to separate the directories in the pathname. N is:

Answers:

• @

• /

• ,

• \

41. What do we get from running this command? echo "april|may|june|july" | awk -F'|' '{print $3}'

Answers:

• april

• may

• june

• error

• july

42. Which of the following is NOT a scripting language in Unix?

Answers:

• Python

• script

• Tcl

• Perl

43. To refer to your home directory, you use:

Answers:

• !

• All are correct

• $HOME

• $LOGDIR

44. The Bourne shell has one file in your home directory  that it reads when you log in; this file is:

Answers:

• .sh.login

• .bourne

• .shrc

• .profile

45. A Unix user can belong to:

Answers:

• exactly one group

• more than one group

• more than one group if the user's UID is 0

• more than one group if the user is root, daemon, agent, uucp, lp, or news

46. The cal command...

Answers:

• none are correct

• shows a simple calendar

• shows a simple calculator

• shows a scientific calculator

47. The Unix escape character is:

Answers:

• |

• /

• !

• \

48. To list only the account name associated with the current login, you use the command:

Answers:

• who

• whoami

• id

• w

49. After a fork, the new process...

Answers:

• has what is in the sixth field of the user record in the /etc/passwd file, as its current directory

• has the $PWD directory as its current directory

• has its user's home directory as its current directory

• inherits its current directory from its parent process

50. Once you delete a file in Unix:

Answers:

• it is gone forever

• it is still in the file-system

• it is moved to a special directory

• it is recoverable easily

51. If you use the command 'ls -F', a string that ends in @ is a:

Answers:

• symbolic link

• normal, plain file

• directory

• program (executable) file

52. If you wanted to have multiple outputs for a particular command or script which standard base utility would you use?

Answers:

• mirror

• tea

• mir

• tee

• rep

53. Which command is used to make a compressed archive of a directory?

Answers:

• tar cvf <directory.tar> <directory>

• tar xvf <directory.tar> <directory>

• All of these

• tar create <directory.tar> <directory>

54. You instruct a program to take its input from a previously prepared text file using the input redirection character:

Answers:

• <<

• <<<

• <

• ;

55. The Unix end-of-file character is:

Answers:

• Control-D

• Control-M

• Control-R

• Control-J

56. In the /etc/group file, the group with GID 0 contains:

Answers:

• all the privileged accounts of the system (e.g., daemon or lp)

• all the users on the system

• all the system's administrators (root users)

• all users with non privileged accounts

57. The notation '.' in an ls listing, is shorthand for:

Answers:

• the current location in the directory hierarchy

• the parent directory (one level up) in the directory hierarchy

• a hidden file

• a regular file

58. If your account is named myuser, and you changed your password, one way to test that you type the new password correctly is:

Answers:

• verify myuser

• None of these

• user myuser

• su myuser

59. The numeric permission equivalent to '-rw-rw----' is:

Answers:

• 770

• 660

• 330

• 440

60. To show the grand total, in kilobytes, of all directories (to which you have access) at or below the current point in the file system, you use:

Answers:

• df --total

• df -t

• dd -a

• du -sk

61. When searching the path, if there are two commands with the same name:

Answers:

• the one that is found last in the path will be executed

• either one that is found in the path will be executed

• the one that is found first in the path will be executed

• an error will be produced

62. A good account name for the default user that will need to carry out only non-privileged operations is:

Answers:

• nobody

• root

• daemon

• lp

63. To channel the output of one command or program into the input of another, you use:

Answers:

• >

• >>

• &

• |

64. chmod allows you to specify permissions for a file using octal numbers. 1000 permission is:

Answers:

• Sticky bit

• Execute by owner

• Execute by other

• Execute by group

65. Can a Unix filename contain a space?

Answers:

• Yes

• No

66. When files are recovered after any sort of problem or failure, if the kernel cannot ascertain the proper location in the file system, the recovered file is placed in the directory:

Answers:

• crash

• lost+found

• tmp

• recovered

67. What will be the output of the command: basename /var/tmp/myfile.txt

Answers:

• myfile

• /var

• /var/tmp

• myfile.txt

• .txt

68. If you wish to change both owner and group of a file in a two-step process, use these commands:

Answers:

• chowngrp and chgrp

• chown and chomod

• chmod and chowngrp

• chgrp and chown

69. In Unix, ping works on which protocol?

Answers:

• tcp

• icmp

• udp

• arp

70. To run network services on "trusted" (numbered below 1024) ports, your effective UID should be:

Answers:

• same as the port number

• 6

• 1

• 0

71. A period, in a Unix file name:

Answers:

• Separates the file name from the file extension

• Is not allowed as first character

• Is just another valid character

• Is not allowed

72. To know which tty you are on, you use the command:

Answers:

• tty

• term

• whoami

• terminal

73. The standard shell of Unix System V is:

Answers:

• bash

• tcsh

• sh

• csh

74. Passwords may contain:

Answers:

• Only upper and lower case characters, numbers, and the "_" character

• Any character, and the system does not distinguish between upper and lower case characters

• Any character besides: "/',.() and the system distinguishes between upper and lower case characters

• Any character, and the system distinguishes between upper and lower case characters

75. What does SNMP stand for?

Answers:

• System Node Message protocol

• Simple Network Messaging Protocol

• Socket Node Messaging protocol

• Simple Network Management Protocol

76. A password security feature of Unix allows N to set an expiration date on users' passwords:

Answers:

• N is the account owner

• all are correct

• N is anyone in the user's groups

• N is the superuser

77. If you execute the following, which users can read the file? chmod 060 file

Answers:

• All users

• Only members of the file's group, except for the file's owner.

• Only the file's owner

• Only members of the file's group including the file's owner

78. What happens to a process accessing a file if you delete the file?

Answers:

• You can still find the file in /lost+found

• The process asks you what new file to save the data in

• The process continues to access the file via its inode

• The process crashes

• The process loses the file lock

79. Listing directory trees recursively, in ls you use the flag:

Answers:

• -r

• -R

• -a

80. The whereis command helps you to locate...

Answers:

• all are correct

• source code

• manual pages

• executable files

81. Which of the following find commands is correct?

Answers:

• find . -name "taco*" -exec "rm {} ";

• find . -name "taco*" -exec rm %1 ;

• find . -name "taco*" -exec rm {} \;

• find . -name taco* -exec rm {}

82. Which of the following is NOT used as a wild-card in the shell?

Answers:

• ?

• ^

• [mn]

• *

83. What will the following command result in on a SystemV host?:  ps -ef | grep "[/]sbin/init"

Answers:

• Will display only the init process

• Will display only the grep process

• Will display every process except for init

• Will display the init process and the grep process

84. The command 'chmod o+w flog' will...

Answers:

• modify others' privileges on flog

• modify privileges for flog for all users

• modify the owner's privileges for flog

• modify group privileges for flog

85. In a file delimited by commas, what command will print the 3rd column of data:

Answers:

• awk '{print $3}'

• awk -f, '{print $3}'

• awk -F, '{print $3}'

86. What is the primary difference between binaries located in /bin and /sbin versus /usr/bin and /usr/sbin?

Answers:

• There is no difference other than historical preference.

• Binaries located in the /usr trees have different permission sets.

• Binaries located in /bin and /sbin are expected to be on the root partition to be available for single user or repair modes.

• Binaries located in /usr/bin and /usr/sbin are built exclusively by the system admin or users.

87. How does Unix maintain its time clock?

Answers:

• YYYYMMDDHHMMSS format

• tz format

• all of them are correct

• epoch format

88. When you execute the command 'cp . newdir', you...

Answers:

• copy the current directory files to the newdir directory

• copy the current directory files and its directories and contents (recursively) to the newdir directory

• get an error or the directory is copied as a regular file

• copy the current directory files and directories to the newdir directory

89. The command that would append the output from the encrypter to the current contents of the file private and read in the contents of the file top_secret, is:

Answers:

• encrypter > top_secret << private

• encrypter < top_secret > private

• encrypter < top_secret >> private

• encrypter << top_secret > private

90. To be run by the shell, a shell script needs the following permission(s):

Answers:

• read, write, and execute

• execute

• read and execute

• write and execute

91. The superuser can:

Answers:

• decrypt (to ASCII) the passwords in the /etc/passwd file

• none are correct

• all are correct

• kill a process that is in a "wait" state in the kernel

92. To display or set your terminal characteristics, you use the command:

Answers:

• terminal

• tty

• term

• stty

93. In an ls listing, 'l' 's' and '-' indicate:

Answers:

• Local file, Symbolic link, Directory

• Symbolic link, Socket, Directory

• Local file, Symbolic link, Regular file

• Symbolic link, Socket, Regular file

94. If you use the command sequence: echo "hello">file; ln file newfile; rm file; What will happen when you run: cat newfile

Answers:

• Nothing will print because newfile is now empty

• An error will result because newfile points to a file that was removed

• The text "hello" will be printed

• The text "newfile" will be displayed

95. To list the current users logged on to the system you use:

Answers:

• w

• who

• users

• all are correct

96. What is the default maximum number of open files a user can have?

Answers:

• 4096

• unlimited

• 8192

• 1024

• 2048

97. When you first log in to a Unix system,  the login program performs various security measures.  Which is not one of these security measures?

Answers:

• login checks to see if you are not the root (privileged) user

• login checks whether the file nologin exists in /etc

• login checks if a minimum amount of time passed since your last login

• login checks on which tty you're coming into the system

98. How would you print the content of the file in a reverse?

Answers:

• printr

• print -r

• tac

• cat -reverse

99. A user reports a problem. In order to gain access to his account in the most secure and non obtrusive way, you...

Answers:

• none are correct

• su to root, and then you su to the user's account

• investigate as root

• ask the user for his password and login with it

100. In Unix, a filename cannot have the following character:

Answers:

• ,

• all are correct

• /

• \

101. Which of the following is not contained in the inode structure?

Answers:

• File name

• Number of hard links

• User ID of Owner

• Date file was modified last

• File size

102. You inspect the last access time (atime) instead of the last modification time (mtime) in ls output by using the following switch to ls:

Answers:

• -la

• -ls

• -lm

• -lu

103. If FFF is a file, the command 'touch FFF' will:

Answers:

• update the ctreation, access, and modification times of FFF to the current time

• update the access and modification times of FFF to the current time

• update the modification time of FFF to the current time

• update the access time of FFF to the current time

104. Which of the following would you use to set yourself as the superuser in a secure way?

Answers:

• su -

• su - root

• /bin/su -

• /bin/su - root

105. To set a file so that anybody can read it but only root can modify it without changing the file's owner, you use chmod's octal permissions of:

Answers:

• 4444

• 644

• 400

• 444

106. If your umask is 007 it means that default files are created with the permissions:

Answers:

• read+write for the owner or group and no permissions or everyone else

• read+write+execute for the owner or group and no permissions for everyone else

• read+write for everyone else and no permissions for the owner or group

• read+write+execute for everyone else and no permissions for the owner or group

107. Changing a file's permissions...

Answers:

• does change its modification time and will change it's inode's ctime

• does not change its modification time but will change it's inode's ctime

• does change its modification time but will not change it's inode's ctime

• does not change its modification time and will not change it's inode's ctime

108. When you check a file's permissions, and there's an "S" in the place of "x" in the owner permissions section of the ls command, it means that the:

Answers:

• Sticky bit is set

• gid bit is set

• uid bit is set

• System is in fault

109. chmod allows you to specify permissions for a file using octal numbers. 4000 permission is:

Answers:

• Set group ID on execution (SGID)

• Set user ID on execution (SUID)

• Sticky bit

• Read by owner

110. How do you determine the runlevel of the running system?

Answers:

• rc -l

• init -r

• who -r

• grep runlevel /etc/inittab

111. To change the flog file permissions so that others besides you could neither read nor write to it, you do:

Answers:

• chmod go+x flog

• chmod go-rx flog

• chmod go= flog

• chmod go-r flog

112. True or False: Multiple usernames on Unix are allowed to have the same UID.

Answers:

• False

• True