Tuesday, December 15, 2015

Unix test answers of 2016.

In this post you can find Complete and recently updated Correct Question and answers of Unix. All Answers updated regularly with new questions. Upwork Unix test answers of 2016.



Question:* You display the contents of a text file on the screen using the command:

Answer: • cat

Question:* Files in Unix may be a representation of the system's:

Answer: • All are correct

Question:* The command 'chmod -x /tmp/tmp.tmp' will:

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

Question:* To list directories rather than their contents, in ls you use the flag:

Answer: • -d

Question:* The format of a cp command is to specify:

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

Question:* To Rename a file, you use the command:

Answer: • mv

Question:* If your (effective) process UID is 0, you can:

Answer: • all are correct

Question:* To create a directory, you use:

Answer: • mkdir

Question:* Unix filenames are case sensitive. This is:

Answer: • Always true

Question:* On Unix, you copy a file using the command:

Answer: • cp

Question:* Unix has the following file/directory permissions:

Answer: • Read, write, execute

Question:* To make a secure encrypted connection to the remote computer, you use:

Answer: • ssh

Question:* You can change your password with the command:

Answer: • passwd

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

Answer: • pwd

Question:* What happens if you try to create a directory with a name that has already been used?

Answer: • you get an error message

Question:* To become the superuser, you can can use the command:

Answer: • su

Question:* To securely copy files between computers, you use:

Answer: • scp

Question:* When root creates a new account, by default the account password is:

Answer: • There are no "default" passwords on Unix

Question:* The mv command:

Answer: • moves a file to a new location

Question:* The search path is stored in an environment variable named:

Answer: • PATH

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

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

Question:* To make a file ac2 executable, you use the command:

Answer: • chmod +x ac2

Question:* To check the Current Date and Time you use:

Answer: • date

Question:* In an inode, you usually will find:

Answer: • all are correct

Question:* 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.

Answer: • True

Question:* The command that lists the users logged on to the system now is:

Answer: • who

Question:* A hidden file is any file whose:

Answer: • first character of the filename is a '.'

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

Answer: • &

Question:* What's the environment variable for your default shell?

Answer: • $SHELL

Question:* In Unix, which of the following are not treated as files?

Answer: • In Unix, everything is a file

Question:* To display hidden (dot) files, you use the command:

Answer: • ls -a

Question:* When you type the name of a command, the shell finds it in:

Answer: • all are correct

Question:* Which command is used to send and receive mail in Unix?

Answer: • mailx

Question:* To temporarily change your UID, you use the command:

Answer: • su

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

Answer: • 750

Question:* To specify an absolute path, the string for the path starts with:

Answer: • /

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

Answer: • chmod g+w flog

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

Answer: • chmod o-r flog

Question:* To refer to the parent of the current working directory, you use:

Answer: • ..

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

Answer: • /

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

Answer: • june

Question:* Which of the following is NOT a scripting language in Unix?

Answer: • script

Question:* To refer to your home directory, you use:

Answer: • $HOME

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

Answer: • .profile

Question:* A Unix user can belong to:

Answer: • more than one group

Question:* The cal command...

Answer: • shows a simple calendar

Question:* The Unix escape character is:

Answer: • \

Question:* To list only the account name associated with the current login, you use the command:

Answer: • whoami

Question:* After a fork, the new process...

Answer: • inherits its current directory from its parent process

Question:* Once you delete a file in Unix:

Answer: • it is gone forever

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

Answer: • symbolic link

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

Answer: • tee

Question:* Which command is used to make a compressed archive of a directory?

Answer: • tar cvf <directory.tar> <directory>

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

Answer: • <

Question:* The Unix end-of-file character is:

Answer: • Control-D

Question:* In the /etc/group file, the group with GID 0 contains:

Answer: • all the system's administrators (root users)

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

Answer: • the current location in the directory hierarchy

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

Answer: • su myuser

Question:* The numeric permission equivalent to '-rw-rw----' is:

Answer: • 660

Question:* 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:

Answer: • du -sk

Question:* When searching the path, if there are two commands with the same name:

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

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

Answer: • nobody

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

Answer: • |

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

Answer: • Sticky bit

Question:* Can a Unix filename contain a space?

Answer: • Yes

Question:* 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:

Answer: • lost+found

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

Answer: • myfile.txt

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

Answer: • chgrp and chown

Question:* In Unix, ping works on which protocol?

Answer: • icmp

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

Answer: • 0

Question:* A period, in a Unix file name:

Answer: • Is just another valid character

Question:* To know which tty you are on, you use the command:

Answer: • tty

Question:* The standard shell of Unix System V is:

Answer: • sh

Question:* Passwords may contain:

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

Question:* What does SNMP stand for?

Answer: • Simple Network Management Protocol

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

Answer: • N is the superuser

Question:* If you execute the following, which users can read the file? chmod 060 file

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

Question:* What happens to a process accessing a file if you delete the file?

Answer: • The process continues to access the file via its inode

Question:* Listing directory trees recursively, in ls you use the flag:

Answer: • -R

Question:* The whereis command helps you to locate...

Answer: • all are correct

Question:* Which of the following find commands is correct?

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

Question:* Which of the following is NOT used as a wild-card in the shell?

Answer: • ^

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

Answer: • Will display only the init process

Question:* The command 'chmod o+w flog' will...

Answer: • modify others' privileges on flog

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

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

Question:* What is the primary difference between binaries located in /bin and /sbin versus /usr/bin and /usr/sbin?

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

Question:* How does Unix maintain its time clock?

Answer: • epoch format

Question:* When you execute the command 'cp . newdir', you...

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

Question:* 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:

Answer: • encrypter < top_secret >> private

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

Answer: • read and execute

Question:* The superuser can:

Answer: • none are correct

Question:* To display or set your terminal characteristics, you use the command:

Answer: • stty

Question:* In an ls listing, 'l' 's' and '-' indicate:

Answer: • Symbolic link, Socket, Regular file

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

Answer: • The text "hello" will be printed

Question:* To list the current users logged on to the system you use:

Answer: • who

Question:* What is the default maximum number of open files a user can have?

Answer: • 1024

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

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

Question:* How would you print the content of the file in a reverse?

Answer: • tac

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

Answer: • investigate as root

Question:* In Unix, a filename cannot have the following character:

Answer: • /

Question:* Which of the following is not contained in the inode structure?

Answer: • File name

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

Answer: • -lu

Question:* If FFF is a file, the command 'touch FFF' will:

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

Question:* Which of the following would you use to set yourself as the superuser in a secure way?

Answer: • /bin/su -

Question:* 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:

Answer: • 444

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

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

Question:* Changing a file's permissions...

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

Question:* 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:

Answer: • uid bit is set

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

Answer: • Set user ID on execution (SUID)

Question:* How do you determine the runlevel of the running system?

Answer: • who -r

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

Answer: • chmod go= flog

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

Answer: • True



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers