Quiz
Examen 101 - LPI Chapter 4,5: Managing Files (31 de 50)
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (40)
1You type mkdir one/two/three and receive an error message that reads, in part, No
such file or directory. What can you do to overcome this problem? (Select two.)- AAdd the --parents parameter to the mkdir command.
- BIssue three separate mkdir commands: mkdir one, then mkdir one/two, and then
mkdir one/two/three. - CType touch /bin/mkdir to be sure the mkdir program file exists.
- DType rmdir one to clear away the interfering base of the desired new directory tree.
- EType mktree one/two/three instead of mkdir one/two/three.
2Typing ls -ld wonderjaye reveals a symbolic file mode of drwxr-xr-x. Which of the
following are true? (Select two.)- Awonderjaye is a symbolic link.
- Bwonderjaye is an executable program.
- Cwonderjaye is a directory.
- Dwonderjaye has its SUID bit set.
- Ewonderjaye may be read by all users of the system.
3When should programs be configured SUID root?
- AAt all times. This permission is required for executable programs.
- BWhenever a program should be able to access a device file.
- COnly when they require root privileges to do their job.
- DNever. This permission is a severe security risk
- EWhenever the program file is owned by the root user.
4You see the usrquota and grpquota options in the /etc/fstab entry for a filesystem.
What is the consequence of these entries?- AQuota support will be available if it’s compiled into the kernel; it will be automatically
activated when you mount the filesystem. - BUser quotas will be available, but the grpquota option is invalid and will be ignored.
- CQuota support will be disabled on the filesystem in question.
- DNothing. These options are malformed and so will have no effect
- EQuota support will be available if it’s compiled into your kernel, but you must activate
it with the quotaon command.
- AQuota support will be available if it’s compiled into the kernel; it will be automatically
5Which of the following commands can be used to summarize the quota information about
all filesystems?- Arepquota
- Brepquota -a
- Cquotacheck
- Dquotacheck –a
- Eedquota -a
6Which of the following file-location commands is likely to take the most time to find a file
that may be located anywhere on the computer (assuming the operation succeeds)?- AThe find command.
- BThe locate command.
- CThe whereis command.
- DThe type command.
- EThey’re all equal in speed.
7What can the type command do that whereis can’t?
- AIdentify the command as being for x86 or x86-64 CPUs
- BLocate commands based on their intended purpose, not just by name
- CIdentify a command as an alias, internal command, or external command
- DAssist in typing a command by finishing typing it for you
- EIdentify a command as being a binary or a script
8What can you conclude from the following interaction?
$ which man
/usr/bin/man- AThe only file called man on the computer is in /usr/bin.
- BThe /usr/bin/man program was installed by system package tools.
- CThe /usr/bin/man program will be run by any user who types man.
- DThe first instance of the man program, in path search order, is in /usr/bin.
- EThe user man owns the /usr/bin/man program file.
9Which one of the following commands copies files with the .txt extension from /dir into /dir2, while preserving file attributes such as dates?
- Amv --copy /dir1/*.txt /dir2
- Bmv /dir1/*.txt /dir2
- Ccp -k /dir1/*.txt /dir2
- Dcp -p /dir1/*.txt /dir2
- Ecp -p /dir2 < /dir/*.txt
10Which one of the following file globs matches "Linux" and "linux", but not "linux.com" and not "TurboLinux"?
- A[L/linux]
- B?inux
- C\L\linux
- D[Ll]inux
- E[Ll]inux?
11Which one of the following outcomes results from the following command?
#chmod g+s /home/software- AThe SUID bit will be set for /home/software
- BThe SGID bit will be set for /home/software, preventing access by those not a member of the software group.
- CThe SGID bit will be set for /home/software, in order to keep group membership of the directory consistent for all files created.
- DThe sticky bit will be set for /home/software
- EThe sticky bit will be applied to all files in /home/software.
12Which one of the following commands versosely extracts files from a tar archive on a magnetic tape device?
- Atar cvf /dev/st0
- Btar cvf /dev/ttyS0
- Ctar xvf /dev/st0
- Dtar xvf /dev/ttyS0
- Etar rvf /dev/st0
13Which command can be used to quickly tell you if an executable command is in any directory defined in your $PATH environment variable?
- Afind
- Blocate
- Cwhich
- Dwho
- Ewhat
14Which directory, according to he Filesystem Hierarchy Standard, is designed to hold essential system binaries?
- A/sbin
- B/bin
- C/usr/bin
- D/opt/bin
- E/usr/local/bin
15According to the Filesystem Hierarchy Standard, what directory (or directories) must hold the system kernel? (Select two)
- A/boot
- B/
- C/opt
- D/sbin
- E/kernel
16What command(s) can be used to copy data to and from raw devices, bypassing the filesystem? (Select two)
- Acp
- Btar
- Cdd
- Dmv
- Esed
17A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?
- Armdir '~/\dir'
- Brmdir "~/\dir"
- Crmdir ~/'dir'
- Drmdir ~/\dir
- Ermdir ~/\\dir
18Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
- Adirname
- Bwhich
- Cbasename
- Dquery
- Ewhereis
19In compliance with the FHS, in which of the directories are man pages found?
- A/usr/share/man
- B/opt/man
- C/usr/doc/
- D/var/pkg/man
- E/var/man
20Which of the following commands displays the contents of a gzip compressed tar archive?
- Agzip archive.tgz | tar xvf -
- Btar ztf archive.tgz
- Cgzip -d archive.tgz | tar tvf -
- Dtar cf archive.tgz
21Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?
- Acat < myapp | cat > file1.log
- Bmyapp 0>&1 | cat > file1.log
- Cmyapp | cat > file1.log
- Dmyapp | tee file1.log
- Etee myapp file1.log
22Which of the following commands will change the quota for a specific user?
- Aedquota
- Brepquota
- Cquota -e
- Dquota
23Which of the following file permissions belong to a symbolic link?
- A-rwxrwxrwx
- B+rwxrwxrwx
- Clrwxrwxrwx
- Dsrwxrwxrwx
24What is the output of the following command?
#echo "Hello World" | tr -d aieou- AHello World
- Beoo
- CHll Wrld
- Deoo Hll Wrld
25In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?
- A-dirmax
- B-maxdepth
- C-maxlevels
- D-n
- E-s
26Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?
- Afile /tmp/myfile.txt
- Becho "Hello" >/tmp/myfile.txt
- Csed -ie "s/1/2/" /tmp/myfile.txt
- Decho -n "Hello" >>/tmp/myfile.txt
- Etouch /tmp/myfile.txt
27What does the ? symbol within regular expressions represent?
- AMatch the preceding qualifier one or more times
- BMatch the preceding qualifier zero or more times.
- CMatch the preceding qualifier zero or one times.
- DMatch a literal ? character.
28Which of the following commands prints all files and directories within the /tmp directory or its subdirectories
which are also owned by the user root? (Choose TWO correct answers.)- Afind /tmp -uid root -print
- Bfind -path /tmp -uid root
- Cfind /tmp -user root -print
- Dfind /tmp -user root
- Efind -path /tmp -user root print
29Which of the following commands changes the ownership of file.txt to the user dan and the group staff?
- Achown dan/staff file.txt
- Bchown dan:staff file.txt
- Cchown -u dan -g staff file.txt
- Dchown dan -g staff file.txt
30Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?
- Achmod u=rwx,go=rx /bin/foo
- Bchmod o+rwx,a+rx /bin/foo
- Cchmod 577 /bin/foo
- Dchmod 775 /bin/foo
31Which of the following commands can be used to display the inode number of a given file?
- Ainode
- Bls
- Cln
- Dcp
32Which of the following commands are common Linux commands for file management? (Choose three
correct answers.)- Acopy
- Bmv
- Cmove
- Dcp
- Emkdir
33Which of the following commands can be used to create a new file that is 100kB in size?
- Add
- Bfile
- Cmkfile
- Dtouch
34In compliance with the FHS, in which of the following directories are documentation files found?
- A/usr/share/documentation
- B/usr/local/share/documentation
- C/var/share/doc
- D/usr/share/doc
- E/etc/share/doc
35Which chown command will change the ownership to dave and the group to staff on a file named
data.txt?- Achown dave/staff data.txt
- Bchown –u dave –g staff data.txt
- Cchown --user dave --group staff data.txt
- Dchown dave:staff data.txt
36Which of the following is the GRUB 2 boot loader configuration file?
- A/dev/grub
- BThe MBR
- C/boot/grub/grub.conf
- D/boot/grub/grub.cfg
- E/boot/grub/menu.lst
37What program do you use to start or stop services when using the systemd initialization
process?- Ajournalctl
- Bsystemctl
- Cinit
- Dservice
- Esystemd
38What is an advantage of vi over graphical text editors?
- Avi is X based, so it is easier to use than other graphical text editors.
- Bvi encodes text in EBCDIC, which is more flexible than Emacs’s ASCII.
- Cvi’s mode-based operations permit it to handle non-English languages.
- Dvi includes a built-in web browser and email client; Emacs doesn’t.
- Evi is smaller, so it can fit on compact emergency USB flash drive systems and embedded
devices.
39How do you exit vi’s insert mode to type command-mode commands?
- APress the ~ key.
- BPress the Esc key.
- CPress Ctrl+X followed by Ctrl+C.
- DPress the F10 key.
- EPress the Shift+Insert key combination.
40What line in /etc/inittab would indicate that your default runlevel is 5?
- Aca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
- Bid:5:initdefault:
- Csi:5:sysinit:/etc/init.d/rcS
- Dl5:5:wait:/etc/init.d/rc 5
- E1:2345:respawn:/sbin/getty 38400 tty1
Information
- Description
- Se aprueba con 31 preguntas como minimo.
- Author
- Carlos Alberto Jara Alva
- Language
- Español
- Views
- 186
- Rating
- No ratings yet Rate this quiz