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
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.
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
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
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
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.
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)?
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
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)?
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
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.
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?
D. browse on the directory
E. users cannot run shell scripts
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?
B. quota -l
E. quota –list
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?
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?
C. mount -t cdrom/dev/cdrom/mnt/cdrom
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.
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
QUESTION NO: 71
Which one of the following programs will only find files that are in your PATH?
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.
QUESTION NO: 73
You want the default permissions for your files to be -rw-r—– . HOW must you set
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
QUESTION NO: 75
Which of the following programs will only find files that are in your PATH?
QUESTION NO: 76
Which option must be listed in /etc/fstab to activate user quotas automatically?
To implement quota in partitions, we should mount with usrquota for user quota,
grpquota for group quota. Example of mounting /home using usrquota and
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?
B. rpm-Qavy > report
C. rpm-Vqt– nomd5>report
D. rpm-checkfiles >report
E. rpm-Va-nofiles > report
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?
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
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
The correct answer is ‘ls >> bazz’ because it is appended.
QUESTION NO: 94
Which command is used to dump files in octal format?
D. cat -o
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
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
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
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.
Topic 3, Volume C
QUESTION NO: 99
Which command will print line numbers before each line in a file?
C. cat -n
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/
-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 در این مقاله نوشته شده است .
ما تیمی با تجربه در خصوص آموزش، راه اندازی و پشتیبانی پروژه های تحت سیستم عامل یونیکس و سولاریس و لینوکس می باشیم. عمیقا به آموزش نسل جوان کشورمان معتقد هستیم و عزم خود را جذم کرده ایم تا بتوانیم تجاربمان را به آنها آموزش دهیم . برای تماس با ما میتوانید به آدرس firstname.lastname@example.org ایمیل بزنید.