TEST LPI 101_1

Name : Nguyễn Thanh Hải Score : …………………………
1. The command used to determine a file's type is A. type B. find C. file D. ls 2. What command will print a list of usernames (first column) and their corresponding user id (uid,third column) from /etc/passwd? A. cut -d: -fl,3 /etc/passwd B. chop -c l,3 /etc/passwd C. tac l-3 /etc/passwd D. fmt -u /etc/passwd 3. In order to append the output of ls to a file called bazz, which of the following command lines would you use? A. ls > bazz B. ls >& bazz C. ls &> bazz D. ls >> bazz 4. Which of the following sed commands will replace all instances of the string foo with the string foobar changing the file filel.txt in place? A. sed 's/foo/foobar/g' file1.txt B. sed 's/foo/foobar/g' file1.txt > file1.txt C. sed 's/foo/foobar/g' file1.txt | file1.txt D. sed -i 's/foo/foobar/g' file1.txt E. sed -i 's/foo/foobar/g' file1.txt > file1.txt 5. Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.1og?

rpm. What command can put suspended jobs into the background? bg 11. /dev/hdclb3 D. It shows all mounted file systems C.rpm B. rpm -qpl apache-xml.rpm D. /dev/hdcld2p3 8. It mounts the floppy disk for all users B. A. on the first IDE controller on a C system. /dev/hdlb3 C. export LD_LIBRARY_PATH=/usr/local/lib (cả cái này trước nữa.1og 6. ldd /usr/local/lib 9.rpm C. rpm -ql apache-xml.i386. rpm -qp apache-xml.A.i386. teemyapp file1. on the second hard disk. It opens /etc/fstab to edit D.1og C. What does the command mount -a do? A. Which of these commands allows you to use shared libraries that are in /usr/local/lib? A. Identify the proper device for the third partition. nếu chọn 2) C. rpm -qv apache-xml. will install its files before installing it. What command do you issue? A.1og D. myapp 0>&1 | cat > file1.1og B.i386. apache-xml.i386.1og E. export LD_PRELOAD=/usr/local/lib B. It mounts all file systems listed in /etc/fstab 7. /dev/hdb3 B.i386.rpm 10. myapp | cat > file1. Which option must be listed in /etc/fstab to activate user quotas automatically? Usrquota . You want to preview where the package file. myapp | tee file1. cat <myapp | cat > file1. ldconfig /usr/local/lib D.

i386.rpm package gthumb. Now.2.i386.aa should be 600MB and that of the second file named my_backup. The size of the my_backup.i386. You wish to move all of the files and directories from directory /A to directory /B. he wants to break this file into two files in which the size of the first file named my_backup.i386. mv -f /A/* . but are experiencing some problems with it.rpm C.1. rpm -U gthumb-2. How can you remove this package? A. cp /a/* .rpm B.0.i386. Which of the following options would be the most appropriate command line to execute this task? A. John is working as a root user on the Linux operating system. rpm -V --removerpmname C.12.rpm is already installed. split --verbose -b 600m my_backup.2.0. rpm -rrpmname D. You installed a beta rpm package. split --verbose -b 200m my_backup.2.tgz my_backup. rpm -drpmname E.tgz C. He has recently backed up his entire Linux hard drive into the my_backup.tgz. Which command will allow you to install the updated version? A. C.rpm E.0.tgz my_backup. B.tgz file.i3S6.1.2.tgz my_backup. What tool can you use to print shared library dependencies? ldd 13.i386. The company has a Linux-based network. split --verbose -b 200m my_backup.2.tgz. You see following output while trying to install an updated package: [root@example pub]# rpm –I gthumb-2. rpm -qe rpmname B. As root you have navigated to directory /B.rpm 16. rpm -i gthumb-2.tgzaa D.tgz my_backup.ab should be 200MB. rpm -qu gthumb-2. rpm -ivh gthumb-2.rpm D. Which of the following commands will John use to accomplish his task? A.0. .tgz file is 800MB.2. mv -Rf /a/* .tgz 14. split --verbose -b 600m my_backup.0. John works as a Network Administrator for Perfect Solutions Inc. rpm -qiv gthumb-2.0.0. rpm -ev rpmname 15.tgz B.

grep . It makes excessive use of system resources. foo | bar <foobar E. grep . Which of the following command lines will do this? A. B. What is the disadvantage of using the command kill -9 ? A. 19. What is the proper option to put in /etc/fstab to enable group quotas for a particular parition? A. /bin/setpriority +20 12345 D.a[^b].[a] myfile D.D. A core dump file will be created. /usr/bin/renice +20 1234 B.. It affects the entire process group. You want to search the file myfile for all occurrence of string containing at least five characters. foo > bar <foobar 21.. /usr/bin/renice -20 12345 C. The affected process is unable to clean up before exiting. foo <foobar | bar B. C. What command changes the priority of the process running with process id of 12345 to the highest priority? A.*. The action can be blocked by buggy or malicious processes. /bin/setpriority -20 12345 18.[a].a myfile C. E. cp -f /a/* . grep . groupquota . foo |foobar > bar D. D. cp -rf /A/* /b/ 17.a*^b. Which command would you use? A. foo <foobar > bar C. grep a*^b*a myfile B.a myfile 20. You want to the command foo to take its input from the file foobar and send its output to the program bar. where character number 2 and 5 are 'a' and character number 3 is NOT 'b'. E.

Use a symbolic link. C. HOW must you set umask? A. grpquota C. Which one of the following programs will only find files that are in your PATH? A. Use a hard link. groupquoatas D.. Which of the following would be an easy way to move data to a new partition without reconfiguring the path to the data in existing applications? A. Run ext2fs ACL. mount /dev/cdrom C. slocate C. Which of the following commands makes /bin/foo executable by everyone but only writable by its owner? . 027 26. automount /mnt/hdd /mnt/cdrom 24. 037 B. grpquotas 22. 23. 640 C. 038 D. Create a block device offset. mount /dev/cdrom /mnt/cdrom B. find 25. mount /mnt/cdrom E.B. D. locate B. B. Use the loopback device. Typically you can use which of the following commands to mount media in that drive to /mnt/cdrom? A. You have run out of disk space on a partition. You want the default permissions for your files to be -rw-r----. which D. mount -t cdrom/dev/cdrom /mnt/cdrom D. E. You have just added a CD-ROM drive (/dev/hdd) to your system and have added it to your fstab.

gzip B. chmod o +rwx. rpm -ql /etc/exports .3 E. chown 557 /bin/foo D.tar. rpm -F /etc/exports B.5 28. gunzip C. Which RPM command will output the name of the package which installed the file /etc/exports? A. tar D. chmod 557 /bin/foo B. cat –n D.A. rpm -qp /etc/exports E. ln B. Which command will print line numbers before each line in a file? A. You are formatting a single hard disk for a Linux install.bz2? A. a+rx /bin/foo C. bz2unzip 30. chmod 755 /bin/foo 27. nl C. rpm -qf /etc/exports C. numline 29.4 F. What single command (no options or arguments) can be used to fully extract a file called abc.0 B. rpm -Kl /etc/exports D. What is the maximum number of primary partitions you can create? A.1 C.2 D.

unlinked files found byfsck 32. /etc . du and df 35. ps and top C. unknown binary files found by find D. :q! C. :wq! 33. which is more important in a backup routine? A. you realize that you are changing the wrong file. Which of the following is true when hard-linked files are present? A. The hard-linked files may not be empty C. ps and df D. :w! D. df and top E. missing device files found by/proc C. According to the File System Hierarchy Standard. :Q! B. /usr D. What vi command sequence will allow you to quit without saving your changes? A.eg. While editing a file in vi. /tmp C. Both files will share the same inode (ls –I sẽ thấy được điều này) D. Which commands display the processes in Linux? A. /var B. ls and df B. Issuing a long directory listing withls -1 will indicate the link with "->" E. The output of stat will report "hard" instead of "regular file" B. files with unknown owners B. Of the following directories. The file permissions will be prefixed by an "h". hrwxr-x-r-x 34. the lost+found directory is used for: A.31. /root E.

nice B. Enables another command is placed on the same line B. renice 38. Cause stopping the process C. export VARIABLE C. What does the character & when placed at the end of the command? A. nohup C. env VARIABLE nguyenphuongquan@gmail. vmstat D. The process is sent to the first plane E. set $VARIABLE D.36. Restarts a stopped process D. pr E.com . The process is sent to the background 37. What is the command that changes the priority of a running process? A. set VARIABLE E. export $VARIABLE B. What command allows you to make a variable visible to subshells Shell? A.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.