Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/59

Click to flip

59 Cards in this Set

  • Front
  • Back
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 old
find files at least 3 months old
find files at least 3 days old
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
rpm -F package.rpm

to Freshen the package. The Upgrade option will install the package even if no older versions have been installed.
What is the minimal octal value for the chmod command to set a binary program file so that it can be updated and executed by the owner, and executed and read by the group and all other users?
755
Starting from /home/user1, which of the following will finish in /var/log? Select all that apply:

cd ../var/log
cd ../../var/log
cd /var/log
cd ./../var/log
cd /../var/../log
Answer
cd ../../var/log
cd /var/log.
Will the following command create a hard or a symbolic link?
ln file1 linktofile1
hard link.
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 >output.txt 2>+1
command 2+1>output.txt
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.
After editing a file in vi you want to save and exit the file, which of the following will perform this after pressing the ESCAPE key.

:q!
:wq
:sq
:qa
wq
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
--nodeps
When typing at the shell, what character can be used to split a command across multiple lines.
\
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 backup.tar
tar -cf backup.tar /home.

The -x option extracts from an archive, it does not create the archive.
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 handle bigger disks than ext2
ext2 and ext3 are completely different filesystems
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.
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
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 be deleted
The file linkfile1 will become a "broken link"
linkfile1 will be the replacement file
Both origfile1 and linkfile1 will still exist
Deleting origfile1 will cause linkfile1 to become a "broken link"
Which of the following commands will create a ext3 filesystem on /dev/hda1? Select the three most appropriate answers.

mkfs -t ext3 /dev/hda1
mke2fs -j /dev/hda1
format -t -ext3 /dev/hda1
mkfs.ext3 /dev/hda1
newfs -ext3 /dev/hda1
mkfs -t ext3 /dev/hda1, mke2fs -j /dev/hda1

(the -j option adds the journalling required for ext3) and mkfs.ext3 /dev/hda1. The format and newfs commands are not normal linux commands.
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.
set -o noclobber command.

You could use bash -o noclobber, but that would run a new shell, and not the current shell.
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.
apropos or whatis.
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
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.
After creating a new SWAP partition (of the correct type), what is the next step towards making it active?

swapon
swapoff
newswap
mkfsswap
mkswap
mkswap

the swapon / swapoff commands cannot be run until after the swap signature has been created using the mkswap command. The rest are not valid commands.
Which command has been run to show the following output (command only - no path or switches)

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 006: ID 040d:6205 VIA Technologies, Inc. USB 2.0 Card Reader
Bus 004 Device 005: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 004 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 004 Device 003: ID 5543:0004 UC-Logic Technology Corp. Genius MousePen 5x4 Tablet
Bus 004 Device 002: ID 09da:0006 A4 Tech Co., Ltd Optical Mouse WOP-35 / Trust 450L Optical Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 062: ID 10df:0500 In-Win Development, Inc. iAPP CR-e500 Card reader
Bus 001 Device 003: ID 059b:0275 Iomega Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb

which provides a listing of all the USB attached devices.
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
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.
Choose the appropriate missing word.
A ______ link cannot span across multiple filesystems.

hard
symbolic
A hard

link cannot span across multiple filesystems.
When creating a disk partition for a Linux SWAP disk what type should it be set to?

28
38
82
83
100
82.
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.

Note that the long version is grep --ignore-case
Which section of the man pages holds the file formats?

man1
man2
man3
man4
man5
man6
man7
man8
man9
man5
What is the environment variable that holds the normal bash prompt?
$PS1
What command can remove sections from each line of a file. Typically used to extract from a certain column of multicolumn output.
cut
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.

It is the home of system log files and for applications to save data whilst running. The swap disk is normally on it's own dedicated partition.
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:0
export SCREEN=192.168.4.5:0
export DISPLAY=192.168.4.5:0.

The address passed must be the server address, not the client. The SCREEN variable has no affect in this situation.
What is the environment variable that determines what directories are searched by the man command?
MANPATH
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.
644
Which of the following commands can be used to install a debian package? Choose all that apply.

dpkg
debian-add
aptget
apt-get
rpm
dpkg and apt-get commands can be used to install a Debian Package.

The rpm command is used to install a rpm package, not Debian. The rest of the commands do not exist.
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.

The user configurable files change location in grub 2, but the menu.lst file is generated from these and is used to boot from.
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.
apropos or whatis.
What is the maximum number of primary partitions on a physical disk?
4
To overcome this limitation Extended Partions are used.
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
What umask value would ensure that, by default, new files and directories created would not give any permissions except to the owner?
0077

will ensure that, by default, only the owner has permissions for any newly created files and directories.
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.

The answer xhost +, will allow the computer to connect, but will also allow any other computer to connect. The answer xhost -192.168.3.4 will prevent the computer from accessing the X server. The other option is not a valid syntax.
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 >output.txt 2>+1
command 2+1>output.txt
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.
What option on the rm command will prompt for confirmation before each file is deleted?

--ask
--noclobber
-r
-f
-i
-i

The -f option will have the opposite effect of deleting the file without prompting. The -r option will also delete subdirectories and their files. The --noclobber option, is not a valid option for the rm command (although noclobber can be set on the shell, it will have no effect on the rm command). There is no --ask option.
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
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
dmesg can used used to view the kernel ring buffer, showing errors and messages during start-up. The other commands do not exist.
What is the normal configuration file used by the LILO bootloader? Please include the full path and filename.
/etc/lilo.conf
What command is used to remove a variable from the bash shell?
unset
Would a user (not root) other than the owner be able to execute a command with permissions 766

yes
no
No.

Only the owner has execute permissions.
When creating a disk partition for a Linux Operating System Partition (e.g. to install an ext3 filesystem) what type should it be set to?

28
38
82
83
100
83
Starting from /home/user1, which of the following will finish in /var/log? Select all that apply:

cd ../var/log
cd ../../var/log
cd /var/log
cd ./../var/log
cd /../var/../log
cd ../../var/log and cd /var/log.
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 separated not space separated
Treat the input strings as Null separated not space separated.
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
dmesg

The other commands do not exist.
Would a user (not root) other than the owner be able to change to a directory with permissions r-xr--r--

yes
no
No.

Only the owner can change to the directory. Other users have read access, but excecute permission is also needed to change to a directory.
Which of the following permissions have the SUID value set?
4755
What is the normal configuration file used by the LILO bootloader? Please include the full path and filename.
/etc/lilo.conf.
What is the maximum number of primary partitions on a physical disk?
4

To overcome this limitation Extended Partions are used.
How many lines of a file are displayed, by default, using the tail command.
10
Which of the following can be used to determine how long a computer has been running for (without entering any options)? [select two answers]

starttime
uptime
reboottime
systime
top
iostat
vmstat
uptime and top

iostat and vmstat do not provide this information and the other commands do not exist.
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

The recursive option will cause all files and subdirectories to be copied.
What command can be used to merge together two files line-by-line based on a common field? Enter then name of the command only, no path.
join
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

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 option that can be used on the uniq command to only show duplicate lines in a file.

uniq_________filename
-d or --repeated
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