LPIC-1 117 101 Question and Answer part2

LPIC-1 117 101 Question and Answer part2

نمونه سوالات LPIC-1  117 101 ; شامل 50 سوال به همراه پاسخ آن

در این مقاله در ادامه تعداد 50 سوال از سوالات امتحانی LPIC-1 117 101  به همراه پاسخ آنها

آورده شده است . از آنجا دغدغه بسیاری از افرادی که تمایل به شرکت در امتحان LPIC-1 را دارند

پیدا کردن نمونه سوال می باشد که برای بدست آوردن آن گاها نیاز به ثبت نام پولی در سایتهایی

با قیمت نسبتا بالایی می باشد لذا در این مقاله سعی بر آن دارم تا با نوشتن مجموعه ای از این

سوالات به خوانندگان و علاقمندان این رشته کمک کنم تا بتوانند راحتتر در امتحان شرکت نمایند .

لازم بذکر است که این سوالات بطور کامل کلیه سوالات امتحانی را پوشش نمی دهد اما میتواند

بعنوان یکی از منابع خوب کمک نماید .

بخش اول این سوال در لینک  LPIC-1 117 101 Answer and Question part1 موجود است .

 

LPIC-1 117 101 Answer and Question 

part 2

QUESTION NO: 50

You want to search the file myfile for all occurances of string containing at least five

characters,where character number 2 and 5 are ‘a’ and character number 3 is NOT ‘b’.

Which command would you use?

A. grep a*^b*a myfile
B. grep .a[^b].a myfile
C. grep .[a].*.[a] myfile
D. grep .a*^b..a myfile

Answer: B

QUESTION NO: 51

What does the following command do? cat ‘$TEST’

A. Displays a bash syntax error message.
B. Displays the contents of the file named $TEST if it exists.
C. Waits for the user to enter text and then echos the text back.
D. Displays the contents of the file named inside the back quotes.
E. Displays the contents of the named by the environment variable TEST.

Answer: B

QUESTION NO: 52

You want to the command foo to take its input from the file foobar and send its output

to the program bar. Which of the following command lines will do this?

A. foo < foobar | bar
B. foo < foobar > bar
C. foo | foobar > bar
D. foo | bar < foobar
E. foo > bar < foobar

Answer: A

QUESTION NO: 53

Which of the following commands would display the lines containing capital letters

form the file “turkey.txt”?

A. cat turkey.txt|wc -|
B. grep -n [A-Z] turkey.txt
C. cat turkey.txt|wc -w [A-Z]
D. grep -v [A-Z] < turkey.txt
E. for [A-Z] in turkey.txt | count

Answer: B

QUESTION NO: 54

In Bash, inserting “1>&2” after a command redirects

A. standard error to standard input
B. standard input to standard error
C. standard output to standard error
D. standard error to standard output
E. standard output to standard input

Answer: C

QUESTION NO: 55

Identify the proper device for the third partition, on the second hard disk,

on the first IDE controller on a PC system.

A. /dev/hdb3
B. /dev/hd1b3
C. /dev/hdc1b3
D. /dev/hdc1d2p3

Answer: A

Harddisk Recognization Primary Master /dev/hda Primary Slave /dev/hdb

Secondary Master /dev/hdc Secondary Slave /dev/hdd According To question,

Device name is /dev/hdb and paratition number is 3. /dev/hdb3

QUESTION NO: 56

What umask will set the file permissions on a newly created file to -rw-r–r– (644)?

A. 0002
B. 0022
C. 0224
D. 0246

Answer: B
Explanation:

umask command is used to display and set the default permissions.

Here in question asking for the umask value of newly created file having permission

QUESTION NO: 57

Which command will create an ext3 filesystem on /dev/hda2?

A. /sbin/mke2fs -d /dev/hda2
B. /sbin/mke2fs -j /dev/hda2
C. /sbin/mke2fs -m 3 /dev/hda2
D. /sbin/mke2fs -c ext3 /dev/hda2

Answer: B
Explanation:
mke2fs – create an ext2/ext3 filesystem -j Create the filesystem with an ext3 journal.

If the –j option is not specified, the default journal parameters will be used to create

an appropriately sized journal (given the size of the filesystem) stored within the

filesystem. Note that you must be using a kernel, which has ext3 support in order

to actually make use of the journal.

QUESTION NO: 58

What is the proper option to put in /etc/fstab to enable group quotas for a particular

parition?

A. groupquota
B. grpquota
C. groupquoatas
D. grpquotas

Answer: B

QUESTION NO: 59

Which utility would you use to change how often a filesystem check was performed

over an EXT2 filesystem (without losing any data stored on that filesystem)?

A. mod2fs
B. fsck
C. tune2fs
D. mke2fs
E. fixe2fs

Answer: C

QUESTION NO: 60

To allow a regular user account to mount and unmount a filesystem (for instance,

a cdrom or floppy), which option will need to be added to the corresponding line

in /etc/fstab?

A. nouidchk
B. alluser
C. user
D. auto

Answer: C
Explanation:
Answer C is correct. user options is used to allow an ordinary user to mount the

file system. The name of the mounting user is written to mtab so that user can

unmount the file system again.

QUESTION NO: 61

You have run out of disk space on a partition. 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.
B. Use a hard link.
C. Use a symbolic link.
D. Use the loopback device.
E. Create a block device offset.

Answer: C
Explanation:
A Symbolic link points to another file and the contents of link file is referenced file.

So, symbolic linked file occupied the very less space the original file.

QUESTION NO: 62

What TWO permissions must a user have in order to run a shell script?

A. read
B. write
C. execute
D. browse on the directory
E. users cannot run shell scripts

Answer: A,C

QUESTION NO: 63 CORRECT TEXT

Which command (without options) would you use to display how much space

is available on all partitions?

Answer: df
Answer: /bin/df

QUESTION NO: 64

You are using quota on your system. How can you see disk quota details?

A. repquota
B. quota -l
C. quota
D. quotachech
E. quota –list

Answer: A

QUESTION NO: 65

You are experimenting with a binary in /tmp/foo.d that expects its configuration

file at /etc/foo.conf.
You don’t want to save it there, but use a symbolic link to /tmp/foo.d/foo.conf

instead. Which command would accomplish that?

A. ln -s /tmp/foo.d/foo.conf /etc/foo.conf
B. ln /tmp/foo.d/foo.conf /etc/foo.conf
C. ln -s /etc/foo.conf /tmp/foo.d/foo.conf
D. ln /etc/foo.conf /tmp/foo.d/foo.conf

Answer: A
Explanation:
There are two types of link a. Soft link b. Hard link.
b. Soft link à Can create for directory also, can span multiple partitions but available

until and unless Original Files remain. Syntax for Soft link ln -s originalfile linkfile
b. Hard link à One separate Physical File, can’t create for directory, can’t span multiple

file but remains the link file if original file removed.
Syntax for Hard link ln originalfile linkfile

QUESTION NO: 66

Which of the following Linux filesystems pre-allocates a fixed number of inodes

at the filesystem’s make/creation time, and does NOT generate them as needed?

A. ext3
B. jfs
C. reiserfs
D. xfs

Answer: A

QUESTION NO: 67

You have just added a CD-ROM drive (/dev/hdd) to your system and have added

it to your fstab. Typically you can use which of the following commands to mount

media in that drive to /mnt/cdrom?

A. mount/dev/cdrom/mnt/cdrom
B. mount/dev/cdrom
C. mount -t cdrom/dev/cdrom/mnt/cdrom
D. mount/mnt/cdrom
E. automount/mnt/hdd/mnt/cdrom

Answer: D

QUESTION NO: 68 CORRECT TEXT

You have written a custom tool on your local system. Following the Filesystem Hierarchy Standard
(FHS), where should you install the binaries to be available to all users on your system?

Answer: /usr/local/bin
Answer: /usr/local/bin/

QUESTION NO: 69

What does the command mount -a do?

A. It mounts the floppy disk for all users.
B. It shows all mounted file systems.
C. It opens /etc/fstab to edit.
D. It mounts all file systems listed in /etc/fstab.

Answer: D

QUESTION NO: 70

What would the following line accomplish if run as root? chown -R bert /home/bert/*

A. Nothing, this command is invalid.
B. It would revoke bert’s ownership of all files in /home/bert to bert.
C. It would change user ownership of all files in /home/bert to bert.
D. It would set the group ownership of the directory /home/bert to bert
E. It would set ownership of all files and subdirectories in /home/bert to bert

Answer: E

QUESTION NO: 71

Which one of the following programs will only find files that are in your PATH?

A. locate
B. slocate
C. which
D. find

Answer: C

QUESTION NO: 72

What does the Filesystem Hierarchy Standard enable? (Select TWO answers)

A. Software to predict the location of installed files and directories
B. Software to predict the ownership and access rights of installed files and directories
C. Users to predict the location of installed files and directories.
D. Users to predict how the filesystem should be formatted according to need.

Answer: A,C

QUESTION NO: 73

You want the default permissions for your files to be -rw-r—– . HOW must you set

umask?

A. 037
B. 640
C. 038
D. 027

Answer: D

QUESTION NO: 74

Which chown command will change the ownership to foo and the group to bar on a

file named biglist?

A. chown foo/bar biglist
B. chown -u foo -g bar biglist
C. chown foo:bar biglist
D. chown –user foo –group bar biglist

Answer: C

QUESTION NO: 75

Which of the following programs will only find files that are in your PATH?

A. locate
B. slocate
C. which
D. find

Answer: C

QUESTION NO: 76

Which option must be listed in /etc/fstab to activate user quotas automatically?

A. quota
B. user
C. quotaon
D. usrquota

Answer: D
Explanation:
To implement quota in partitions, we should mount with usrquota for user quota,

grpquota for group quota. Example of mounting /home using usrquota and

grpquota options. LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2

QUESTION NO: 77

Which of the following commands makes /bin/foo executable by everyone but

only writable by its owner?

A. chmod 557 /bin/foo
B. chmod o +rwx, a+rx /bin/foo
C. chown 557 /bin/foo
D. chmod 755 /bin/foo

Answer: D

QUESTION NO: 78

You are having problems with a particular font and you want to see if its

directory is included in XF86Config. Which section contains this information?

A. Paths
B. Fonts
C. Files
D. Graphics

Answer: C
Explanation:
/usr/x16r6/lib/fonts

QUESTION NO: 79

You have just set up the X Display Manager as your default display manager.

What file should you edit to change the default background for it?

A. /etc/X11/xdm/Xsetup
B. /etc/X11/prefdm
C. /etc/X11/XF86Config
D. /etc/X11/xdm.conf

Answer: A

QUESTION NO: 80

Which of the following lines from /etc/X11/XF86Config indicates what fonts can

be found on a font server?

A. FontPath= server
B. Fonts “unix/:7100”
C. FontPath “unix/:7100”
D. Fonts= server
E. Fontserver = “servername”

Answer: C

QUESTION NO: 81

You are the system administrator for a consulting firm where several people use

Linux as their desktop operating system. One of your users has installed a

commercial publishing program that works under X on a variety of UNIX and Linux

platforms. The user made a series of configuration changes regarding the initial

window size, location and color. Now, he is having difficulty undoing these changes

and is asking for your help. In which file would you think you would most likely find
the configuration settings you are seeking to change?

A. ~/.xinitrc
B. ~/.xconfig
C. ~/.Xdefaults
D. ~/.XF86Config
E. /etc/X11/XF86Config

Answer: C

QUESTION NO: 82

You are using an application that you want to appear on the screen of another machine.

What environment variable would you have to set or edit to achieve this?

A. DISPLAY
B. REMOTE
C. REMOTE_XWINDOW
D. SCREEN

Answer: A
Explanation:
To share the terminal between multiple hosts, we can export display.
Example

Suppose you want to run application on Certkiller B from Certkiller A.

Certkiller B in GUI Terminal:

# xhost +192.168.0.1 Certkiller A in GUI Terminal:

# export DISPLAY=192.168.0.2:0

#Xterm

QUESTION NO: 83

After installing and configuring Xfree86, you notice that when you start X,

the display is not centered. What program can you run to find a better

modeline setting?

A. XF86Setup
B. xf86config
C. xvidtune
D. xvideoagent

Answer: C

QUESTION NO: 84 CORRECT TEXT

You are running X in networked environment. You want to allow anyone on

your network to display their X applications on your desktop. What command

can you use to disable all access control for X?

Answer: xhost +

QUESTION NO: 85

You just started X for the first time and noticed that the display does not use

the entire screen. What program can you use to fix this?

A. xvidtune
B. xf86config
C. XF86Setup
D. tweakscreen

Answer: A

QUESTION NO: 86

Which of the following is the default XFree86 configuration file?

A. /usr/X11R6/etc/XF86Config
B. /var/X11/XF86Config
C. /etc/X11/XF86Config
D. /usr/etc/X11/XF86Config

Answer: C

QUESTION NO: 87

You have just set up the Gnome Display Manager as your default display

manager. What file should you edit to change the default greeting for it?

A. /etc/X11/prefdm
B. /etc/X11/XF86Config
C. /etc/X11/gdm.conf
D. /etc/X11/gdm/lnit/Default

Answer: D

QUESTION NO: 88

The command cat /proc/dma will show you what?

A. Whether DMA is enabled
B. Which DMA channels are in use
C. Which DMA mode is in use
D. General information about DMA on the machine

Answer: B
Explanation:
Explanation /proc/dma This file contains a list of the registered ISA direct

memory access (DMA) channels in use. A sample /proc/dma files looks like the

following:4: cascade
It shows whether DMA is enabled or not.

QUESTION NO: 89

You are formatting a single hard disk for a Linux install. What is the maximum

number of primary partitions you can create?

A. 0
B. 1
C. 2
D. 3
E. 4
F. 5

Answer: E
Explanation:
Generally in one System we can connect four Physical Harddisks. As a Primary

Master, Primary Slave, Secondary Master, Secondary Slave. In One System: Either

four Primary partitions or 1 Primary or 2 Primary or 3 Primary + 1 extended and

all logical partitions will be create under extended partations. Hardisk device

recognized as follows Primary Master : /dev/had Primary Slave : /dev/hdb

Secondary Master : /dev/hdc Secondary Slave : /dev/hdd Suppose you have only
single harddisk and going to install Linux, Maximum you can create 4 primary

partitions. If you create four primary partitions you can’t create extended partitions

that mean no logical partitions can create.

QUESTION NO: 90

After a minor security incident you are instructed by your lead sys-admin

to verify the RPM’s installed on running system. Which command will create a

complete report which you can analyze for changes which may be security related?

A. .rpm-Va>report
B. rpm-Qavy > report
C. rpm-Vqt– nomd5>report
D. rpm-checkfiles >report
E. rpm-Va-nofiles > report

Answer: A

QUESTION NO: 91 CORRECT TEXT

You are compiling some software from source. After running ./configure with the

appropriate arguments and no errors, what is the next command to run?

Answer: make
Explanation:
The purpose of the make utility is to determine automatically whichpieces of a

large program need to be recompiled, and issue the commands to recompile them.

example C programs, since they are most common, but you can use make with any

programming language whose compiler can be run with a shell command.

In fact, make is not limited to programs. You can use it to describe any task

where some files must be updated automatically from others whenever the others

change.To prepare to use make, you must write a file called the makefile

thatdescribes the relationships among files in your program, and the states the

commands for updating each file. In a program,typically the executable file is

updated from object files, which are in turnmade by compiling source files.

QUESTION NO: 92

You have two shell scripts, foo and bar. You wish to have bar execute if foo

returns an exit status of 0 Select the correct command:

A. foo; bar
B. foo || bar
C. foo && bar
D. foo % bar

Answer: C
Explanation:
Logical AND Operator || ?Logical OR Operator ! ?Logical NOT Operator Correct

Answer is C because first tried to execute foo.

If foo executes without any error then executes bar. If any error occurs in foo

then exit from command.

QUESTION NO: 93

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

Answer: D
Explanation:
The correct answer is ‘ls >> bazz’ because it is appended.

QUESTION NO: 94

Which command is used to dump files in octal format?

A. od
B. octdump
C. dumpoct
D. cat -o

Answer: A
Explanation:

Answer A is correct. od command dump files in octal and other formats.

Example: od test it will display the all contents of file in octal format.

QUESTION NO: 95

You have created a really long letter and after you are done, you notice that

you used the name “Bob” many times but your forgot to capitalize it in many

instances. Which command would you replace “bob” with “Bob” in all instances

and generate a new letter for printing?

A. sed `/bob/Bob’ letter > newletter
B. sed s/bob/Bob/ letter < newletter
C. sed `s/bob/Bob’ letter > newletter
D. sed `s/bob/Bob/g’ letter > newletter
E. sed s/bob, Bob/’ letter > newletter

Answer: D
Explanation:

QUESTION NO: 96

You are logged in as user tux1, but now you want to switch users to tux2 with tux2’s environment.
How would you do this?

A. su tux2
B. su -e tux2
C. su – tux2
D. su -m tux2
E. su -f tux2

Answer: C

QUESTION NO: 97

You wish to kill a process with a PID of 123. Select the command which will allow

the process to “clean up” before exiting.

A. kill -1 123
B. kill -9 123
C. kill -15 123
D. kill -17 123

Answer: C
Explanation:
To terminate the process we use kill command. But we should know the process ID.

In QUESTION:s PID is specified to 123. Syntax of kill command is: kill signal PID

Where -9 is the powerful signal then other signal which kill the process.

QUESTION NO: 98

You have read/write permission on an ordinary file foo. You have just run ln

foo bar. What would happen if you ran rm foo?

A. foo and bar would both be removed.
B. foo would be removed while bar would remain accessible.
C. foo would be removed. bar would still exist but would be unusable.
D. Both foo and bar would remain accessible.
E. You would be asked whether bar should be removed.

Answer: B

Topic 3, Volume C

QUESTION NO: 99

Which command will print line numbers before each line in a file?

A. ln
B. nl
C. cat -n
D. numline

Answer: B

QUESTION NO: 100

You need to create a simple hierarchy of directories:

images/photos/summer/ottawa/. None of the directories on that path exists.

What command will create all of the needed directories in one step?

A. mkdir -r images/photos/summer/ottawa/
B. mkdir -R images/photos/summer/ottawa/
C. mkdir -p images/photos/summer/ottawa/
D. mkdir -P images/photos/summer/ottawa/
E. mkdir -m images/photos/summer/ottawa/

Answer: C
Explanation:
-p options means no error if existing, make parent directories as needed.

It will creates the directory images/photos/summer/Ottawa.

Where images is the parent directory of photos, photosis the parent directory

of summer etc.

بخش دوم از سری سوالات امتحانی LPIC-1 117-101  در این مقاله نوشته شده است .

برای مراجعه به 50 سوال ابتدایی به صفحه LPIC-1 117 101 Answer and Question part1 مراجعه نمایید .

0 پاسخ

دیدگاه خود را ثبت کنید

تمایل دارید در گفتگوها شرکت کنید؟
در گفتگو ها شرکت کنید.

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *