Preparación para el examen LPI 101

Temas 104.x

Test de repaso para el examen

Créditos y licencia de uso

Coordinación:

Manuel Guillán (xLekOx) lpi@xlekox.org

Maquetación:

Manuel Guillán (xLekOx) lpi@xlekox.org

Versión 1.0 (19-09-2004 – 17:00)

Distribuido por FreeUOC (www.freeuoc.org) bajo licencia: Attribution-NonCommercial-ShareAlike2.0 de commons creative

http://creativecommons.org/licenses/by-nc-sa/2.0/

ÍNDICE

Índice de contenido

Temas 104.x	1

Test de repaso para el examen	1

Créditos y licencia de uso	2

ÍNDICE	3

PREGUNTAS TEST – EXAMEN	4

RESPUESTAS TEST EXAMEN	9

PREGUNTAS TEST – EXAMEN

You want to find the full path of a certain command. How would you do this?
A. By using the 'where' command
B. By using the 'path' command
C. By using the 'which' command

What steps need to be performed, to make a new disk accessible to users?
A. fdisk
B. mkfs
C. mount
D. stat
E. quotaon

When the system is mounted, all file systems in the /etc/fstab are mounted, except those with what in the option column?
A. nomount
B. noauto
C. noatime
D. nohup

What command can find the program file "bar" and it's associated man pages and any existing
source files, but not return all files that have "bar" in the command name or path?
A. whereis
B. find
C. locate
D. apropos
E. whatis

What command with options will show the currently mounted filesystems usage in kilobytes?
A. df -k
B. df -h
C. du -k
D. du -h
E. du -s

You need to alter the permissions on the directory /home/mrking and all it's contents to match the following permissions.
drwxr--r--
Which of these commands with options and arguments will accomplish this? Choose two.
A. chmod 0744 /home/mrking -R
B. chmod 744 /home/mrking/*
C. chmod -R u=rwx,g=r,o=r /home/mrking
D. chmod u+rwx,g+r,o+r /home/mrking

What is the simplest and most direct command to check the integrity of an Ext2 file system?
A. fsck.ext2
B. fsck -t ext2
C. e2fsck
D. ext2fsck
E. None of the above

If a file is symlinked to with a link name of file2, and that file is deleted, what happens to the contents of the file?
A. The contents still exist, and can be reached with file2
B. The contents are gone, leaving file2 orphaned
C. The file can be retrieved with undelete -f file2
D. File2 is another name to the original, and the contents are still there

Which utility on a system will report any excessive file system space remaining with very few inodes still available?
A. fsck
B. debugfs
C. sync
D. showfiles
E. softlinks

What options will allow a normal user to mount and then unmount a file system without needing assistance from the root user?
A. user and users in the /etc/fstab
B. user and users in the /etc/default/
C. user and users in the /etc/vfstab
D. user and users in the /etc/mnttab
E. usrquota and grpquota in the /etc/fstab

What two things does the /etc/fstab file contain references to?
A. File Systems
B. Mount Points
C. User Options
D. File System Defaults
E. File System Permissions

Where is the quota information for users of volume /home stored?
A. /etc/sysconfig/quota/quota.home.user
B. /etc/quota/quota.home.user
C. /home/quota.home.user
D. /home/quota.user
E. /home/quota.home.group

What is the purpose of setting the SUID? Choose all that apply.
A.Allows any user to run a executable program with the permissions of the owner of the program
B. Allows any user to run a program with the permissions of the group of the program
C. Everyone can edit the files that are created but only root and owner can delete them.
D. To keep programs that are needed constantly in non-swappable RAM
E. To cause a program opened in one X virtual pane to follow the user's focus to other panes

How can you set the SGID on a file called testkingexaminator?
A. chmod u+s testkingexaminator
B. chmod g+s testkingexaminator
C. chmod o+s testkingexaminator
D. chmod u+t testkingexaminator

To locate all files that are less than 3 days old, you use the _____ -mtime -3 command.

How can you generate a report on disk usage and quotas for all filesystems which are defined in /etc/mtab to be read-write with quotas.
A. quotarep-a
B. repquota /dev/hd*
C. repquota -a
D. quotarep /dev/hd*

What type of information is found in the /etc/fstab file?
A. Information about mounted filesystems.
B. Information about hard disks such as cylinders and heads.
C. Information about filesystems and mount points.
D. Information about filesystems types such as super block offset
E. Information about the consistency of each currently mounted filesystem.

You installed a new experimental kernel and found that one of your ext2 partitions no longer functions. You tried unsuccessfully to repair it. What program can you use to interactively debug the filesystem?
A. e2fsck
B. tune2fs
C. debugfs
D. tine2fs
E. dumpe2fs

You want to make sure certain directories are excluded when you update your locate database file.Where would you typically store this configuration?
A. /etc/locatedb.conf
B. /etc/slocatedb.conf
C. /etc/searchdb.conf
D. /etc/updatedb.conf

What would cause a system to report having excess free space but very few available inodes?
A. Too many hard links are in use on /home.
B. A user has created many very small files.
C. fsck hasn't been run on /home in a while.
D. Too many symbolic links are in use on /home.
E. The disk needs to be synced before running df.

You have the following file:
-rwxrwxr-x 1 foo root 0 Feb 23 07:48 /bin/foo
Which of the following commands will change the owner of the file /bin/foo from the foo user to the bar user without affecting group ownership?
A. chown /bin/foo bar
B. chown bar /bin/foo
C. chown bar.foo /bin/foo
D. chown.foo.bar /bin/foo

Which of the following programs can be used to the find the foo program in the PATH and associated man pages, but not list every file containing foo on the system?
A. which
B. search
C. slocate
D. where
E. whereis

What does the command "ln test king" typically do?
A. It will create a symbolic link from test to king.
B. It will create a hard link from king to test.
C. It will create a symbolic link from king to test.
D. It will create a copy of the file test in king.

You are preparing to mount a new ext3 partition. What command would you use to check the filesystem for errors before mounting it? (Include only the command without path, options, or arguments)

What utility is used to verify the integrity of a filesystem? (Do not specify path or parameters)

Your unmask is set to 002. If you create a new file, what will the permission of the new file be?
A. -rw-rw-r--
B. rwxrwx-w-
C. ------w-
D. rwxrwxr-x

What must be added to the following to enable group quotas for /usr?
/dev/hda2 /usr ext2 defaults 1 1

Type in the command line that will display the partitions on just the Secondary Slave drive in your system.

Type the full command line to begin partitioning the second SCSI drive on your system using the most common disk partitioning tool.

Type the command and argument that would cause the default permissions on newly created files to be set as:
rw- r-- r--

What command will remove all files named core in the home directories of users (/home), that are more than 7 days old? Type in the simplest command that would do this, without any prompting to delete the files.

You wish to find out the full path of the binary executable "cmd1". Type just the command that will show the first instance of the command.

What file must be put in the root of a filesystem for quotas to be enabled for users?

You are the root user of a system, and need to gather quota information about all users on the system. Type the command along with any options and arguments to accomplish this.

On a standard Linux system as a normal user, what umask value will cause your file to be created with the following permissions ?
drwxr-x--- 2 username group 512 Mar 6 11:16 dir1
-rw-r----- 1 username group 0 Mar 6 11:16 file1

A file named "testking1" is set with the following ownership:
Owner = foo
Group = bar
You want to change this file's ownership to be totally owned by foobar, what command string will accomplish this?

You are experiencing errors and strange occurrences on an Ext2 filesystem, and want to debug it's operations. Type just the command that will most directly accomplish this.

RESPUESTAS TEST EXAMEN

C

A,B,C

B

A

A

A,C

C

B

A

A

A,B

D

A,D

B

find

C

C

C

D

D

C

A

B

e2fsck

fsck

A

grpquota

fdisk -l /dev/hdd

fdisk /dev/sdb

umask 022 Alternative correct answer: umask 0022

find /home -mtime +7 -name core -exec rm -f {} \;

which cmd1

quota.user Alternative correct answer: aquota.user

repquota -a

027 Alternative correct answer: 0027

chown foo.bar testking1 Alternative correct answer: chown foo:bar testking1

debugfs

Tema 104.x Preguntas de repaso

Página 9 de 9

2004-07-21T14:39:00