UNIX Chapter 8
When using the Linux top command, look under the ___ column to determine what CPU percentage is used by active processes.
%CPU
Which of the following characters would you place at the end of a command to have the specified utility program run in background mode?
&
In Linux, use the free commands ____ parameter to see the output in megabytes.
-m
In Linux, use the free commands ___ parameter to see memory use totals.
-t
When you create a session name in a man page, such as the DESCRIPTION section, what tag should you use just before the section name?
.SH
You have just started the Linux top utility. Press ____ to access the online help.
?
True or False. Does the cp or copy command duplicate a file and alter the format of the destination copy?
False
True or False. The df command can be used to make backup copies of a floppy disk.
False
True or False. The expr command clones output streams to one or more files.
False
True or False. The od command concatenates files horizontally.
False
True or False. The terminate command is used to suspend a process.
False
True or False. The top command with the -s option runs top in cumulative mode.
False
True or False. The ud utility summarizes disk usage.
False
True or False. conv=ascii is a parameter used with the cmp command to convert a binary file to ASCII.
False
True or False. rsh is used to schedule jobs to run at a later time from the console of a server.
False
You write documentation for your company, including man pages. The company policy is that you must test to judge the appearance of a man page before you place it in production. Which of the following commands enables you to accomplish this?
Groff -Tascii -man filename | more man ./filename
What is the purpose of the netstat utility?
It provides network connection information
Last week, the marketing director in your firm installed many new programs and marketing demonstration files on his computer. Today he calls you because he seems to be out of disk space. What should he have done before loading all of these new files?
Run the df utility to analyze used and available disk space. Run the du utility to determine how disk usage is spread across directories and to obtain totals of disk usage.
The president of your company often creates e-mail text and attachments using the vi editor. Unfortunately, the president often misspells words in these communications. What do you recommend?
The president can be taught to use the ispell utility.
True or False. A program that is running in Linux is identified by a number called a process id.
True
True or False. Are the reports displayed by the df utility based on the command option entered?
True
True or False. Garbage files are temporary files, such as core files, that lose their usefulness after several days.
True
True or False. If you use the du command without any options, you receive a report based on all file usage starting with the current directory and processing down through subdirectories.
True
True or False. The ping command is used to poll another network station.
True
True or False. When creating a file that is to be processed using groff, can you use any editor that works with flat files, for example vi or Emacs?
True
How can you run a command in the background?
Type & right after the command
You have received a message that a particular Linux kernel version has a security problem. How can you determine the kernel version, or versions if you have more than one installed, that are available on your system?
Use the command ls /lib/modules
You manage a Linux server and a user calls to say that a program, called stats that she has been running to perform a statistical calculation is hung. What might you do in this situation?
Use the kill command to stop the program's process. Use the ps command to determine the process id.
Use the cat command to create a file named datafile.
cat > datafiles
Which of the following UNIX/Linux security utility changes the access permissions of a file or directory?
chmod
Which of the following commands changes the owner of a file?
chown
Linux offers the ___ command to compare the differences between two files.
cmp
The ___ command displays the character position and the line number of the first difference between two compared files.
cmp
You have been working on a script called budget_analysis, but have been on a business trip for the last week. When you get back to your office, you discovery you have two copies of this script, one in your scripts directory and one in your source directory. Both scripts were last accessed on the same date. Which of the following commands can you use to determine if they are identical?
cmp
Issue the Linux command to compare the differences between the files file1 and file2.
cmp file1 file2
The Linux ___ command enables you to copy a file and also has the advantage that you can convert the files contents in the process.
dd
You have an older IBM mainframe file written in EBCDIC and need to convert it to ASCII for use on your Linux server. Which of the following commands can you use?
dd
Make a copy of the document datafile using the dd command, and call the copy datafile.bak
dd if=datafile of=datafile.bak
In Linux, you use the ___ command to determine usage of the file systems on your hard drive.
df
Use the df command to view the numbers in human-readable form instead of displaying raw numbers for size, amount of disk space used, and amount of space available.
df -h
You have a computer resources committee meeting that starts in five minutes and you just remembered that you need to give a brief report about how much disk space is in use and how much is available on two servers, and you want to provide this information in gigabytes. Which of the following commands should you use?
df -h
When you want to see directory, subdirectory, and file size information in Linux, use the ___ command.
du
Use the du command to receive a report on disk usage by the number of bytes instead of by 512-byte blocks, and pipe it into the more command.
du -b | more
Which of the following UNIX/Linux file processing utilities is used to backup files?
dump
Use the find command to search your current directory for all files named core or a.out
find . "(" -name a.out -o -name core ")"
Use the find command to search your current directory and delete all files named core or a.out
find . "(" -name a.out -o -name core ")" -exec rm {} \;
There are times when you might want to send the results of the free utility to a computer support person for help. Redirect the output of the free utility to a file named freedata in your current directory.
free > freedata
Which of the following UNIX/Linux file-processing utilities processing embedded text formatting codes?
groff
The Linux ____ network utility enables you to view IP address information and set up to a network interface.
ifconfig
Which of the following commands checks one or more files for spelling errors?
ispell
Assume that you have just created a text file named myfile in Linux. Use a tool to check and correct the spelling errors in the document.
ispell myfile
When using the Linux top command, press ___ to stop a process that is running.
k
You have been monitoring your system using the top command and see a program you want to stop. Which of the following commands enables you to do this while you are still in top?
k
Provide the Linux command to stop the process with process ID 12169
kill 12169
Which of the following enables you to print the file coffee_break_memo?
lpr coffe_break_memo
Which of the following UNIX/Linux programming utilities maintains program source code?
make
In Fedora or Red Hat Enterprise Linux, what would you find in the directory /usr/share/man/man1?
man pages files having the suffix .1
The Linux ____ network utility uses TCP/IP to poll another network station and test network connectivity.
ping
The ___ command shows you a list of the processes currently running.
ps
Type the Linux command to determine the PID of your bash shell session.
ps
Use the Linux command to display all processes running on your system and determine which users own them.
ps -A u
Use the Linux ps command to see a list of all processes running on the system, by user name. Pipe the output into the more command.
ps -A u | more
In Linux, you want to know who is running a particular process, by user name. Type ___.
ps u
When using the Linux top command, press ___ to exit.
q
Which of the following commands can be used with find to clean up unused files?
rm
Which of the following UNIX/Linux utilities suspends process execution for a specified time?
sleep
Which of the following UNIX/Linux communication utilities lets users simultaneously type messages to each other?
talk
Which of the following UNIX/Linux network utilities is used to connect to a remote computer on a network?
telnet
Sometimes, your system might respond slowly or seem to have delays. In these conditions, it is useful to employ the Linux ___ command to monitor CPU use by processes and other system information.
top
You are the system administrator for a server and need to determine what CPU resources are currently being used by the user ifstone. Which of the following commands would you use?
top
Start the Linux top utility so that it updates every 20 seconds.
top -d 20
Provide the command used to run the Linux top utility to secure mode.
top -s
There are times when you might want to send the results of the top utility to a computer support person for help. Redirect the output of the top utility to a file named topdata in your current directory.
top > topdata
Run the Linux top program in the background.
top&
On a single command line, use the Linux touch command to create the file letters, then use the dd command to make a backup named letters.bak
touch letters ; dd if=letters of=letters.bak
On a single command line, use the touch command to create the files core and a.out in your home directory.
touch ~/core ; touch ~/a.out
The ___ file-processing command counts lines, words, and bytes in a file.
wc
Which of the following system status utilities displays brief information about the users who are logged on to a system?
who
Which of the following UNIX/Linux network utilities controls the modem dialer or dial-up connection over the phone lines?
wvdial