/etc/profile |
All users at your site are using the BASH shell. You want to set the variable that will apply to every user and always have the same value. Which file would you place this variable in? |
.profile |
A user is requesting that each time she logs in, a particular entry be written in a log file. This will only apply to her and she is using the Bash shell. In which configuration file would you make an entry for this action to take place? |
~/.profile |
Which of the following files would you create aliases that are applied when a specific users |
~/.bash_profileAfter |
After a user starts a BASH session and the scripts in /etc/profile are applied, what is the next file that could affect the next file session? |
~/.bash_login |
Your default runlevel on your Linux system is set to textual, multi-user mode; however, you want the X Windows System to launch when you log into the system. Which file should you edit? |
/root/ni |
You have an executable style named ni that allows you a snapshot of your network information with the date and time log in the file. The file is in the /root directory, and the /root directory is the current working directory. How could you run the executable style file? |
Bourne-Again Shell (BASH) |
Bourne-Again Shell (BASH)Which of the following options is the standard shell for most Linux computers? |
You are working at the command line and need to start a new Bourne again shell (bash) session. What should you type? |
bash |
What command should you enter to see a list of all commands you recently used at the command prompt? |
history |
you have the myapp executable file. It is found in the current directory, but not in the command path. What should you type at the command prompt to start the myapp file and replace the shell with myapp process? |
exec./myapp |
What is the result of the uname -a command? |
All system information is displayed on the screen |
Which command will display the present working directory |
pwd |
Which of the following commands could you use to search man pages for a specific keyword? |
apropos whatis man -k |
You are working on a Linux system and need more information about a uname command. What command should you use to learn about the uname command syntax and options. |
man uname |
You need to set the COMP variable to the value of 1745. Which command will set the variable so it is available to other shell programs? |
export COMP=1745 |
Two Users should have identical settings yet one is having problems with the display on his screen and you suspect there is a difference in their environment variables. Which command will display all the environment variables? |
env |
Which of the following statements best describes a PATH environment variable? |
It contains the directory prefixes used to search for programs and files |
Which command shows the value of an environmental variable currently set for the terminal? |
echo $term |
You want to view the number of commands your HISTSIZE environment variable is set to save. You don’t want to have to scroll through all the environment variables. Which command shows you the value for the HISTSIZE variable? |
echo $HISTSIZE |
Which of the following presents the greatest security risk? |
The PATH statement includes .(period) |
Which command will display all the environment variables on the system? |
set |
Which command will display only the environment variables applied to child sessions? |
env |
You recently used the HOST=FS4 command. What command should you use to make the environment variable apply to all the child sessions? |
exportHOST |
Which environment variable affects the number of past commands used in the current shell session . ? |
HISTSIZE |
Which of the following commands will configure the shell to retain 300 recently-used commands in the ~/.bash/history file for multiple shell sessions? |
HISTFILESIZE =300 |
You want the directory /sbin/special to always be a part of the PATH. You also want to keep all current entries in your PATH statement. Which of the following commands would you use? |
PATH=$PATH:/sbin/special |
What line must you add to /etc/profile to make sure /sbin/custom is always part of the PATH environment for all users, without overwriting the current entries in the PATH statement? |
PATH=$PATH:/sbin/custom;export PATH |
Which of the following commands will create a shortcut to the tail -f /var/log/messages command? |
alias sysmeg="tail -f /var/log/messages |
Which key combination should you press in vi to save the file you are working on and quit? |
:wq |
You need to create a new text file with the name network.txt in the current directory. Which command starts vi and creates a file? |
vi network.txt |
You opened the /root/myscript file in vi. While looking at the file, your soda spilled and you hit several keys on the keyboard trying to pick it back up. There are extra characters everywhere in the file and you know you cant fix it. How do you exit vi without saving the changes? |
:q! |
A friend sent you a shell script file that is 117 lines long. He wants you to examine the code on lines 82 through 87. What command in command mode takes you directly to line 82? |
82 |
After opening a file in vi you want to switch from command line mode. What key should you enter? |
: |
You made a few changes to the /boot/grub/grub.conf file and now you need to exit out of insert mode, save the changes and quit. What should you do? |
type :wq Press esc |
What are two methods to exit vi from command mode? |
Type : wy Type: ZZ |
While in command mode you need to find the term Sam. Which command should you use? |
/Sam |
While in command mode you copied a whole line of text to memory. You navigated to a different location in the file and now you need to place the line of text. What command should you use? |
p |
While in vi mode you need to copy an entire line of text. What command should you use? |
yy |
Which of the following commands will cut an entire line from a file while in vi command mode? |
dd |
You are editing a text file with vi and need to open a new line above the one you are currently working on. What key should you press to accomplish this? |
O |
Move the cursor up a line |
k |
Move the cursor one space to the left |
h |
Move the cursor one space to the right |
l |
Move the cursor down a line |
j |
You are trying to debug a shell script called myscript and to aid you in this task you would like to have the output of the script recorded in a text file. Which of the following would satisfy your requirement ? |
myscript >>testfile.txt |
What will be in the effect of the following command? |
The contents of the /usr/bin directory will be redirected into a file called /tmp/list.txt inserted after previous contents of the file |
You are trying to debug a shell script that has the command ls -s in it. You suspect an error is occurring here and want to send the results of the operation (successful or error) to a file named Friday in order to examine it later. Which command should you use? |
ls -s>Friday>2&1 |
Which of the following commands will give you the same results as cat < turbo? |
cat turbo |
Which of the following commands sorts the contents of wordlist1 and wordlist2 and sends the result to a standard output? |
cat /usr/wordlist1 /usr/wordlist2 | sort |
Which symbol uses the output of one line command as the input of another command? |
| |
Which command reads from standard input and writes to standard output and files? |
tee |
Which of the following commands displays the contents of wordlist1 and wordlist2 then sorts the combined contents then sends the results to the monitor and file named sortedwordlist? |
cat /usr/wordlist1 /usr/wordlist2 | sorted wordlist |
Which command overcomes the 128 KB shell command size restriction by breaking up long lists of arguments? |
xargs |
Which of the following commands redirects standard output to standard error? |
cat txtfile 1>&2 |
You need to create a directory /var/oracle/database/9i. Only the directory /var currently exists. From the root of the filesystem, which command will create a directory path? |
mkdir -p /var/oracle/database/9i |
In the /var directory is a subdirectory called backup. You need to delete the directory backup and any files. You change the directory to focus to /var. Which command will delete the directory backup and its files? |
rm -rf backup |
You need to make and expanded listing of all the files in the /etc . Which command will produce the listing? |
ls -al /etc |
You need to view the contents of the /home/jerrys directory. Which command will show all the contents including hidden files and directories? |
ls -a/home/jerrys |
Which of the following commands copies the entire /temp directory with all of its files sub-directories and files in the sub-directories to the /home/gshant directory? |
cp -r /temp /home /gshant cp -R /temp /home /gshant |
The /home/ gshant /smp directory is empty and needs to be removed. You change the directories to /home/gshant which command should you use? |
rmdir smp |
The /home/gshant/smp directory contains several files. The directory and files need to be removed. You change directories to /home/gshant. Which command do you need to use? |
rm -r smp |
Which of the following would be the result of the command ln -b ~/file1 /data/file1? |
A copy of the file ~ /file1 would be placed in /data |
You previously created symbolic links in your home directory to a set of files in the /data directory using the ln -s command. The system administrator has just deleted those files. What happens to the links that you created? |
The symbolic links would still exist in your home directory but they would now be broken. |
What are the permission strings for symbolic link and hard link? |
Symbolic Link: lrwxrwxrwx Hard Link: -rwxr -xr-x |
Which of the following is not a characteristic of a hard link? |
Distinct inode |
After using the ls command in the current working directory you notice the following files: lrwxrwxrwx 1 root root 4 2010-11-05 myfile -> shantsgems Whats true about the file? |
myfile is a symbolic link to shantsgems |
Which directory contains data files that change constantly, including e-mail, print jobs, and proxy cache file? |
/var |
Which of the following represent the root directory? |
/ |
Under the filesystem hierarchy standard (FHS) Which directory contains the device files for the Linux system? |
/dev |
Under the filesystem hierarchy standard which directory contains information about the system state and processes ? |
/proc |
Which directory is the home directory for the root user account? |
/root |
Which of the following statements best describe the purpose of the filesystem hierarchy standard? |
Individual users can predict where to find system configuration files During installation software can predict where to place configuration files |
Which directory holds the man files in the system? |
/usr/share/man |
Chapt 1.0-1.7
Share This
Unfinished tasks keep piling up?
Let us complete them for you. Quickly and professionally.
Check Price