This site is 100% ad supported. Please add an exception to adblock for this site.

Penguin Tutor

Terms

undefined, object
copy deck
What command can remove sections from each line of a file. Typically used to extract from a certain column of multicolumn output.

cut
yy
cp
zz




cut
Which of the following commands will provide a breakdown of how the disk space is used within a filesystem?

dd
df
ds
du




du
Which of the following will copy the directory dir1, including all files and subdirectories below it into a new directory called copyofdir1?

cp dir1 copyofdir1
cp -d dir1 copyofdir1
cp -f dir1 copyofdir1
cp -r dir1 copyofdir1

cp -r dir1 copyofdir1
Which of the following is often used for the configuration of X11?

/etc/X11/xorg.conf
/etc/X11/xorgConfig
/etc/X11/xconfiguration
/etc/Xconfig
/etc/X.conf





/etc/X11/xorg.conf
What option on the grep command will result in a case insensitive match?

grep -v
grep -V
grep -I
grep -i
grep --ignore-caps





grep -i
What command can be used to show the first few lines of a text file?
head
Which of the following can be used before starting an xterm launched from machine 10.3.45.1 will output its display on the primary screen on machine 192.168.4.5?

export DISPLAY=10.3.41.1:0
export SCREEN=10.3.41.1:0
export DISPLAY=192.168.4.5:
export DISPLAY=192.168.4.5:0
Which of the following contains the list of operating systems that grub will display at boot time.

/etc/grub.cfg
/etc/grub/menu.lst
/boot/grub.cfg
/boot/grubmenu.lst
/boot/grub/menu.lst







/boot/grub/menu.lst
What is the numerical value of the SIGHUP signal, often used with the kill command to cause a daemon to reload its configuration file?
1
When creating a disk partition for a Linux SWAP disk what type should it be set to?

28
38
82
83
100





82
What is the /var partition normally used for?

Storing real-time variables
Executable files
Files that are fixed and do not change
Files that change frequently
Swap partition





Files that change frequently
Would a user (not root) other than the owner be able to execute a command with permissions 766

Yes
No


No
What command can be used to show the first few lines of a text file?

head
Which of the following entries will run the command \"runme\" putting the output into the file \"output.txt\"

runme > output.txt runme < output.txt runme | output.txt output.txt > runme
runme > output.txt
What command can be used to save standard input into a file as well as send it to standard output? Enter the command name only.
tee
What option on the tail command will cause it to keep displaying new lines as they are written to the file (e.g. when viewing current log files)?

-o
-r
-i
-l
-f





-f
Using the mkdir command which option will create multiple levels of subdirectories in a single command?

-p
-r
-d
-s




-p
Which section of the man pages holds the file formats?

man1
man2
man3
man4
man5
man6
man7
man8
man9









man5
What command can be run in the bash shell, to prevent accidentally overwriting a file. E.g. to prevent you from overwriting a file using a > redirect in the current shell.
To prevent accidentally overwriting a file in bash you can use the set -o noclobber command.
What is the name of the file normally used to control which static filesystems are mounted or to allow users to mount static filesystems (assuming appropriate permissions assigned)?

/etc/_____

fstab

fstab holds the static information about filesystems to be mounted. Note supermount is often used for removable file systems (such as USB disks), but fstab is still used for the static filesystems.

What command can remove sections from each line of a file. Typically used to extract from a certain column of multicolumn output.
The cut command.
The command man -k will search the man database for a command. What other command can be used to search the whatis database? There are two possible answers, only enter one.
The other programs that search the man database are \"apropos\" or \"whatis\".
After a new program has been installed in the default path, the locate command does not find it. What command can be used to ensure that locate knows about the new command?
The command \"updatedb\" will update the database used by locate and slocate.
Which of the following will update package.rpm, only if an earlier version is already installed?

rpm -u package.rpm
rpm -U package.rpm
rpm -F package.rpm
rpm -f package.rpm




The correct answer is:
rpm -F package.rpm

to Freshen the package. The Upgrade option will install the package even if no older versions have been installed.


Which of the following will take you back to your home directory (select all that apply)?

cd HOME
cd $HOME
cd USER
cd $USER
cd ˜





The answer is cd $HOME and cd ˜.
Which of the following will allow a computer to make connections to the local X server, only if its ip address is 192.168.3.4? Select the most appropriate answer.

xhost +
xhost 192.168.3.4
xhost -192.168.3.4
xhost --allow=192.168.3.4
xhost 192.168.3.4
If using the xargs command in a pipeline, what is the effect of using the -0 option?

Do not run the program
Only run if earlier program in the pipe failed
Only run if earlier program in the pipe succeeded
Treat the input strings as Null se
xargs -0 will Treat the input strings as Null separated not space separated.
Which of the following contains the list of operating systems that grub will display at boot time.

/etc/grub.cfg
/etc/grub/menu.lst
/boot/grub.cfg
/boot/grubmenu.lst
/boot/grub/menu.lst





The file is normally located in /boot/grub/menu.lst. The user configurable files change location in grub 2, but the menu.lst file is generated from these and is used to boot from.
What umask value would ensure that, by default, new files and directories created would not give any permissions except to the owner?
A umask of 0077 will ensure that, by default, only the owner has permissions for any newly created files and directories.
Which of the following is true when comparing the ext2 and ext3 filesystems, in normal use? Select the two most appropriate answers.

ext3 is the same as ext2 with added journaling
ext3 is faster than ext2
ext2 is faster than ext3
ext3 can
The correct answers are ext3 is the same as ext2 with added journaling and ext2 is faster than ext3. The reason for ext3 being slower is that it has the same overheads as ext2, but with the addition of journaling. During a filesystem check ext3 is often faster than ext2, but not during normal running.
Looking at the find command shown below what effect does the \"-mtime -3\" have?

find /home -mtime -3

find files at least 3 seconds old
find files at least 3 hours old
find files at least 3 days old
find files at least 3 weeks
The answer is: find files at least 3 days old
Choose the appropriate missing word.
A ______ link cannot span across multiple filesystems.

hard
symbolic



A hard link cannot span across multiple filesystems.
What is the octal value for the chmod command to set a file so that it can be read and written to by the owner, and read by the group and all other users? It should not be executable.
The required permissions are 644
Which of the following is often used for the configuration of X11?

/etc/X11/xorg.conf
/etc/X11/xorgConfig
/etc/X11/xconfiguration
/etc/Xconfig
/etc/X.conf





The correct answer is /etc/X11/xorg.conf (for X.org)
When typing at the shell, what character can be used to split a command across multiple lines.
The \\ character inserted at the end of a line indicates that the command continues to the next line.
What is the maximum number of primary partitions on a physical disk?
The maximum number of primary partitions on a physical disk is 4. To overcome this limitation Extended Partions are used.
What is the name of the file normally used to control which static filesystems are mounted or to allow users to mount static filesystems (assuming appropriate permissions assigned)?
/etc/fstab holds the static information about filesystems to be mounted. Note supermount is often used for removable file systems (such as USB disks), but fstab is still used for the static filesystems.
Which of the following entries will run the command \"runme\" putting the output into the file \"output.txt\"

runme > output.txt runme < output.txt runme | output.txt output.txt > runme
The answer is runme > output.txt. The < will use the file as input to the command, the pipe | will send the output of runme to a program called output.txt and the final example will run the programme output.txt putting the output into the file runme.
What is the environment variable that determines what directories are searched by the man command?
The environment variable for the man search directory is MANPATH
What is the correct syntax to configure the file package.deb? Choose the most appropriate answer.

dpkg -i package
dpkg -c package
dpkg -s package
dpkg --config package
dpkg --configure package
dpkg --setup package

The command to configure package.deb would be: dpkg --configure package. The -i option would install as well as configure the package. The -c option will list the contents of the package, the -s option will list the status of a package and the rest are not valid options.
Would a user (not root) other than the owner be able to read a file with permission 744

Yes
No


Yes. The 4 gives read permission to those in the group and other users.
What option is used on the rpm command so that a dependency check is not peformed before installing or upgrading a package? Just include the option, do not include the command.
The option to prevent dependency checking is --nodeps.
What is the normal configuration file used by the LILO bootloader? Please include the full path and filename.
The configuration file for LILO is /etc/lilo.conf.
After the operating system is up and running, what command can be used to view errors that occurred during the bootup?

booterror
errormsg
amesg
dmesg
logrotate





The command dmesg can used used to view the kernel ring buffer, showing errors and messages during start-up. The other commands do not exist.
A hard link is created so that origfile1 is accessible through linkfile1. The reference to origfile1 is then removed using the rm command. What will happen to linkfile1?
After the reference to origfile1 has been removed linkfile1 will still exist. The filename linkfile1 will point to the file that was originally created by origfile1 and the reference to origfile1 will no longer exist.
Which of the following commands can be used to partition up a disk in preparation for installing the Linux operating system, or creating a disk for data storage?

admin
fdisk
format
mkfs




The correct answer is fdisk. The admin command is used to administer SCCS and is nothing to do with disk partitioning. The format command does not exist on linux. The mkfs command is used to create a filesystem after the partitions have been created.
Which of the following will run command2, only if command1 is successful.

command1 > command2
command1 & command2
command1 && command2
command1 | command2
command1 || command2





The answer is command1 && command2. The > sign will cause command2 to be replaced with the output of command1. A single & will cause the first command to run in the background. The | is the or symbol, not the and symbol.
What is the option that can be used on the uniq command to only show duplicate lines in a file.
uniq -d filename
Which of the following will create a tar file containing all the files of the directory /home into a file backup.tar?

tar -xf backup.tar /home
tar -xf /home backup.tar
tar -cf backup.tar /home
tar -cf /home backup.tar
tar /home bac
The correct answer is tar -cf backup.tar /home. The -x option extracts from an archive, it does not create the archive.
Which of the following will output both the standard output and the standard error to the file output.txt? Choose the most appropriate answer.

command >output.txt 2>output.txt
command 1&2>output.txt
command >output.txt 2>&1
command >out
The correct answer is: command >output.txt 2>&1 which redirects the standard error to the standard output. The option command >output.txt 2>output.txt can be used on some systems, but may not work on all systems, and will not keep the error messages with the correct standard output messages.
How many lines of a file are displayed, by default, using the tail command.
10
Which of the following can the touch command not do? [select one option]

Create a new file
Create a new file with a different modification date
Change the modification time on an existing file
Change permissions on a file


Change permissions on a file
A symbolic link is created so that origfile1 is accessible through linkfile1. The file origfile1 is then deleted using the rm command. What will happen to linkfile1?
The file linkfile1 will become a \"broken link\"

Deck Info

53

welcome47

permalink