Linux LPI 117-101 # 7 Of 9

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Tobyyy
T
Tobyyy
Community Contributor
Quizzes Created: 10 | Total Attempts: 1,456
| Attempts: 110
SettingsSettings
Please wait...
  • 1/60 Questions

    To change the priority of a running process, you use the _____ command. (Specifycommand only with no options)

Please wait...
About This Quiz

This quiz, titled 'Linux LPI 117-101 # 7 of 9', assesses knowledge of Linux system priorities and commands. It includes questions on syslog identifiers and command prioritization, crucial for system administrators and IT professionals aiming to master Linux operating systems.

Linux LPI 117-101 # 7 Of 9 - Quiz

Quiz Preview

  • 2. 

    What program would you use to increase or decrease the priority of a commandbefore it is executed?

    Explanation
    nice command helps to run the command by setting different priority.
    #nice -n -20 find / -size +1024k
    Which runs the find command by setting priority value -20.

    Rate this question:

  • 3. 

    What command could be used to get a hierarchical view of all the processes runningon the system without requiring your to provide any switches or options?

    Explanation
    The top programs provides a dynamic real-time view of running
    system. It can display system summary information as well as a list of tasks
    currently being managed by the linux kernel.

    Rate this question:

  • 4. 

    You wish to list all files within your current working directory that are of the typeASCII, showing just a single line for each of those files. Type in the command stringthat would accomplish this.

    Explanation
    file command determines the type of file,
    #file filename
    File type can be ASCI, directory, HTML file etc.
    # file * | grep ASCII : Displays the all ASCII files

    Rate this question:

  • 5. 

    You wish to match instances of the word 'Many' that are at the begining of a line inthe vi editor. What is the key combination to do this? Include the character toindicate a search in VI, and type the command as if you were in Command Mode inVI.

    Explanation
    In vi Editory we can search any pattern in forward directory using /
    and backward direction using ?. As well as can use different string processing
    symbols.
    Whildcard Charaacter:
    . àAny Single Character
    * àzero or more character
    [abc] àAny Single Character from the range
    [^abc] àAny Single Character except from the range
    Similarly Anchors
    ^ àLine beigns with
    $ àLine ends with
    \< àWord beigns with
    \> àWord ends with
    So /^Many search all lines beginning by Many word.

    Rate this question:

  • 6. 

    You wish to match the character string v2.1 v2.2 v2.3 through to v2.9 within VI.Type the search string to achieve this.

    Explanation
    In vi Editory we can search any pattern in forward directory using /
    and backward direction using ?. As well as can use different string processing
    symbols.
    Whildcard Charaacter:
    . àAny Single Character
    * àzero or more character
    [abc] àAny Single Character from the range
    [^abc] àAny Single Character except from the range
    Similarly Anchors
    ^ àLine beigns with
    $ àLine ends with
    \< àWord beigns with
    \> àWord ends with

    Rate this question:

  • 7. 

    Type in the VI command line that would open the file mytestfile.txt and line numberit?

    Explanation
    set number option set the line number in vi editor. If you want to open
    the file in vi editor, you can use one of above command.

    Rate this question:

  • 8. 

    You wish to edit the file 'mytextfile' with the VI editor and search for the string' Certkiller '. Type in the command line to open the file and highlight the first instanceof Certkiller , (and any others).

    Explanation
    To search in vi editor:
    / à Search in Forward Directtion
    ? à Search in Backward Direction
    n à find Next in forward Direction
    Nà Find Next in previous Direction
    So vi +/ Certkiller mytextfile will search the Certkiller in mytextfile.

    Rate this question:

  • 9. 

    Using the VI editor you wish to paste the contents of the b buffer to the position ofthe cursor. What key combination would you type.

    Explanation
    "bp paste the contents of the b buffer to the postion of the cursor.

    Rate this question:

  • 10. 

    You wish to search for lines in VI that end with the string ' Certkiller ' Input thekeystrokes to achive this, including the vi search character.

    Explanation
    In vi Editory we can search any pattern in forward directory using /
    and backward direction using ?. As well as can use different string processing
    symbols.
    Wildcard Character:
    . àAny Single Character
    * àzero or more character
    [abc] àAny Single Character from the range
    [^abc] àAny Single Character except from the range
    Similarly Anchors
    ^ àLine beigns with
    $ àLine ends with
    \< àWord beigns with
    \> àWord ends with
    $ symbol is used to search the pattern ended the lines with.

    Rate this question:

  • 11. 

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

    Explanation
    fdisk is the partition management tool use to create, format, delete the
    partitions. fdisk -l /dev/hda displays the all partitions created in /dev/hda

    Rate this question:

  • 12. 

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

    Explanation
    Device Name Convention
    IDE Disk:
    Primary Master: /dev/had
    Primary Slave: /dev/hdb
    Secondary Master: /dev/hdc
    Secondary Slave: /dev/hdd
    SCSI Disk:
    /dev/sda
    /dev/sdb
    fdisk is the disk management tool use to create, delete the partitions.
    #fdisk -l : Displays all partitions
    #fdisk -l /dev/hda : Displays all partitions created in /dev/had
    #fdisk /dev/hda : fdisk mode can create partition on hda
    #fdisk /dev/sdb : fdisk mode can create partition on /dev/sdb

    Rate this question:

  • 13. 

    Which command (without options) would you use to display how much space isavailable on all partitions?

    Explanation
    df displays the amount of disk space available on the filesystem
    containing each file name argument. If no file name is given, the space available on
    all currently mounted filesystems is shown.
    # df -h : Disk free space in human readable format.

    Rate this question:

  • 14. 

    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)

    Explanation
    e2fsck is used to check alinux second extended file system as well

    as
    third extended file jystem (containing journal in ext2 filesystem). After the

    journal
    has been applied a filesystem will normally be marked as clean. Hence, for ext3

    filesystems, e2fsck will normally run the journal and exit, unless its superblock
    indicates that further checking is required.

    Rate this question:

  • 15. 

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

    Explanation
    fsck checks and repair the Linux File system. While checking the
    filesystem it returns the error code
    0 : No Errors
    1 : File System Errors corrected
    2 : System should be rebooted
    4 : File system errors left uncorrected
    8 : Operational error
    16 : Usage or Syntax error
    32 : Fsck canceled by user request
    # fsck /dev/hda1 : It will check the filesystem error of /dev/hda1

    Rate this question:

  • 16. 

    What command should you use to create an ext2 file system:

    Explanation
    According to the technical information available at Linux From
    Scratch Ver 3.0, To create an ext2 file system, use the mke2fs command. The LFS
    partition is used as the only option to the command and the file system is

    created.
    mke2fs /dev/xxx
    Replace "xxx" by the partition's designation (like hda11).

    Rate this question:

  • 17. 

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

    Explanation
    degubfs program is an interactive file system debugger. It can be

    used
    to examine and change the state of an ext2 filesystem.

    Rate this question:

  • 18. 

    Which of the following syslog identifiers represents the highest priority?

    • Info

    • Warning

    • Notice

    Correct Answer
    A. Warning
    Explanation
    the standard syslog levels are (in descending order of priority): emerg,
    alert, crit, err, warning, notice, info, debug

    Rate this question:

  • 19. 

    Using vi, you want to save changes to the file myfile with :w!, but vi complains itcannot write to the file. Therefore, you want to check the write permissions on thefile. To do this without leaving vi, you type:

    • :!ls -l myfile

    • :\ls -l myfile

    • Esc :ls -l myfile

    • :?ls -l myfile

    Correct Answer
    A. :!ls -l myfile
    Explanation
    A is correct because if you want to execute the bash commands on vi
    editor, use :!command . If you want to list the details of specified files, use :!ls -l
    filename. Similarly to display the date use :!date. To write the output of command
    in opened file in vi editor use !!date, !!ls -l etc.

    Rate this question:

  • 20. 

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

    Correct Answer
    /bin
    Explanation
    The Linux File system Hierarchy

    Rate this question:

  • 21. 

     You run following commands:           [user@prompt]$ nice -n 1 program1           [user@prompt]$ nice -n 5 program2           [user@prompt]$ nice -n 10 program3           Which of the program started will have the highest priority?

    • Program 1

    • Program 2

    • Program 3

    Correct Answer
    A. Program 1
    Explanation
    hen process start, it start with default priority value of 0, Priority
    value can be -20 (which is highest ) to 19 (which is lowest). So Answer A is correct.

    Rate this question:

  • 22. 

    Which of the following commands will print the inode usage on eachmounted filesystem?

    • Du -i

    • Df -i

    • Lsfs -i

    • Printfs -i

    Correct Answer
    A. Df -i
    Explanation
    Explanation Report filesystem disk space usage.
    df -i list inode information instead of block usage.

    Rate this question:

  • 23. 

    Which command would you use to change the priority of a running process?

    • Renice

    • Nice

    • Kill

    • Pstree

    • Killall

    Correct Answer
    A. Renice
    Explanation
    Renice alters the scheduling priority of one or more running
    processes.
    Example: # renice -20 -p 3042 : Which sets the -20 priority to process having 3042 PID.

    Rate this question:

  • 24. 

    Which of the following syslog identifiers represents the highest priority?

    • Notice

    • Warning

    • Error

    • Critical

    Correct Answer
    A. Critical
    Explanation
    critical represents the highest priority of any facility.
    mail.info : Lowest priority
    mail.critical : Highest priority of facilitiy.

    Rate this question:

  • 25. 

    You run the following commands:           [user@prompt]$ nice -n 1 program1           [user@prompt]$ nice -n 5 program2           [user@prompt]$ nice -n 10 program3           Which of the program started will have the highest priority?

    • Program1

    • Program2

    • Program3

    Correct Answer
    A. Program1
    Explanation
    When process start, it start with default priority value of 0, Priority
    value can be -20 (which is highest ) to 19 (which is lowest). So Answer A is correct.

    Rate this question:

  • 26. 

    You want to search the file myfile for all occurances of string containing at least fivecharacters, where character number 2 and 5 are 'a' and character number 3 is NOT'b'. Which command would you use?

    • Grep a*^b*a myfile

    • Grep .a[^b].a myfile

    • Grep .[a].*.[a] myfile

    • Grep .a*^b..a myfile

    Correct Answer
    A. Grep .a[^b].a myfile
    Explanation
    grep, sed, tail, head, less, sort, cut etc are string processing tools,
    which uses different symbls to match the pattern.
    Whildcard Charaacter:
    . àAny Single Character
    * àzero or more character
    [abc] àAny Single Character from the range
    [^abc] àAny Single Character except from the range
    Similarly Anchors
    ^ àLine beigns with
    $ àLine ends with
    \< àWord beigns with
    \> àWord ends with

    Rate this question:

  • 27. 

    You have created a really long letter and after you are done you notice that youused the name "Bob" many times but you forgot to capitalize it in many instances.Which command would replace "bob" with "Bob" in all instances and generate anew letter for printing?

    • Sed '/bob/Bob' letter > newletter

    • Sed s/bob/Bob/ leter < newletter

    • Sed 's/bob/Bob/' letter> newletter

    • Sed 's/bob, Bob/' letter > newletter

    Correct Answer
    A. Sed 's/bob/Bob/' letter> newletter
    Explanation
    sed is called the stream editor command, which is used to find and
    replace the string pattern.
    Example:
    #sed 's/cat/dog/' testfile >testfile1 : Which replace the cat to dog from testfile and redirect
    the output into testfile1 file.
    Similaly Answer C is correct.

    Rate this question:

  • 28. 

    Which of the following syslog identifiers represents the highest priority?

    • Alert

    • Error

    • Critical

    • Emerg

    Correct Answer
    A. Emerg
    Explanation
    the standard syslog levels are (in descending order of priority): emerg,
    alert, crit, err, warning, notice, info, debug

    Rate this question:

  • 29. 

    Which of the following commands would display the lines containing capital lettersform the file "turkey.txt"?

    • Cat turkey.txt|wc -|

    • Grep -n [A-Z] turkey.txt

    • Cat turkey.txt|wc -w [A-Z]

    • Grep -v [A-Z] < turkey.txt

    • For [A-Z] in turkey.txt | count

    Correct Answer
    A. Grep -n [A-Z] turkey.txt
    Explanation
    grep, sed, tail, head, less, sort, cut etc are string processing tools,
    which uses different symbls to match the pattern.
    Whildcard Charaacter:
    . àAny Single Character
    * àzero or more character
    [abc] àAny Single Character from the range
    [^abc] àAny Single Character except from the range
    Similarly Anchors
    ^ àLine beigns with
    $ àLine ends with
    \< àWord beigns with
    \> àWord ends with

    Rate this question:

  • 30. 

    Which of the following syslog identifiers represents the highest priority?

    • Alert

    • Error

    • Critical

    • Emerg

    Correct Answer
    A. Emerg
    Explanation
    critical represents the highest priority of any facility.
    mail.info : Lowest priority
    mail.critical : Highest priority of facilitiy.

    Rate this question:

  • 31. 

    How can you print an entire file to standard output?

    • Printfile

    • Cat

    • Ls

    • Pr2stdout

    Correct Answer
    A. Cat
    Explanation
    Cat allows you to look, modify or combine a file. The ls command will
    list the files and directories within the current working directory (the directory you
    are currently in). Pr2stdout does not exist.

    Rate this question:

  • 32. 

    Which command will show the number of free and used inodes for your system'smounted file systems?

    • Du -i

    • Df -i

    • Ls -iR /

    • Freeinodes

    Correct Answer
    A. Df -i
    Explanation
    df - report file system disk space usage
    -i, --inodes, list inode information instead of block usage

    Rate this question:

  • 33. 

    What command with options will show the currently mounted filesystems usage inkilobytes?

    • Df -k

    • Df -h

    • Du -k

    • Du -h

    • Du -s

    Correct Answer
    A. Df -k
    Explanation
    df displays the amount of disk space available on the filesystem
    containing each file name argument. If no file name is given, the space available

    on
    all currently mounted filesystems is shown.
    # df -k : Disk free space in kilobytes.

    Rate this question:

  • 34. 

    In the vi editor, which of the following commands will delete thecurrent line at the cursor and the 16 lines following it (17 lines total)?

    • 17d

    • 17dd

    • 17x

    • D17d

    • 16d

    Correct Answer
    A. 17dd
    Explanation
    dd option is used to delete the current line. To delete more than one
    line, we should pass the number of lines from current line.

    Rate this question:

  • 35. 

    What steps need to be performed, to make a new disk accessible to users? Select three.

    • Fdisk

    • Mkfs

    • Mount

    • Stat

    • Quotaon

    Correct Answer(s)
    A. Fdisk
    A. Mkfs
    A. Mount
    Explanation
    One large disks convert into multiple small paritions using fdisk,
    sfdisk, GNU parted etc tools. After creating the small partitions needs to create the
    filesystem into the partitions. After creating the filesystem needs to mount on
    directory only after user can use the partition.

    Rate this question:

  • 36. 

    What command with switches will display the disk utilization for all mounted file systems?

    • Df

    • Vmstat

    • Du

    • Top

    • Free

    Correct Answer
    A. Df
    Explanation
    df displays the amount of disk space available on the filesystem containing each file name argument. If no file name is given, the space available on all currently mounted filesystems is shown.
    # df -h : Disk free space in human readable format.

    Rate this question:

  • 37. 

    You want to save vi changes to the file myfile with :w!, but vi complains it can notwrite to the file. Therefore, you want to check the write permissions on the file. Todo this without leaving vi, you type:

    • :!ls -l myfile

    • :\ls -l myfile

    • Esc :ls -l myfile

    • :?ls -l myfile

    Correct Answer
    A. :!ls -l myfile
    Explanation
    You can execute the external commands in vi editor using :! command
    Example: :!ls -l à displays all contents of current directory.

    Rate this question:

  • 38. 

    How many inodes are assigned to a file when it is created?

    • 1

    • 2

    • 4

    • 8

    Correct Answer
    A. 1
    Explanation
    One inode is assigned to one file. You can see by using ls -i or stat
    filename.

    Rate this question:

  • 39. 

    Which of the following Linux filesysterns pre-allocates a fixednumber of inodes at filesysterns make/creation time, and does NOTgenerate them as needed?

    • Ext3

    • Jfs

    • Reiserfs

    • Xfs

    Correct Answer
    A. Ext3
    Explanation
    What are the advantages of ext3?Why do you want to migrate from ext2 to ext3? Four
    main reasons: availability, data integrity, speed, and easy transition.
    Availability
    After an unclean system shutdown (unexpected power failure, system crash), each ext2
    file system cannot be mounted until its consistency has been checked by the e2fsck
    program. The amount of time that the e2fsck program takes is determined primarily by
    the size of the file system, and for today's relatively large (many tens of gigabytes) file
    systems, this takes a long time. Also, the more files you have on the file system, the
    longer the consistency check takes. File systems that are several hundreds of gigabytes in
    size may take an hour or more to check. This severely limits availability.
    By contrast, ext3 does not require a file system check, even after an unclean system
    shutdown, except for certain rare hardware failure cases (e.g. hard drive failures). This is
    because the data is written to disk in such a way that the file system is always consistent.
    The time to recover an ext3 file system after an unclean system shutdown does not
    depend on the size of the file system or the number of files; rather, it depends on the size
    of the "journal" used to maintain consistency. The default journal size takes about a
    second to recover (depending on the speed of the hardware).
    Data Integrity
    Using the ext3 file system can provide stronger guarantees about data integrity in case of
    an unclean system shutdown. You choose the type and level of protection that your data
    receives. You can choose to keep the file system consistent, but allow for damage to data
    on the file system in the case of unclean system shutdown; this can give a modest speed
    up under some but not all circumstances. Alternatively, you can choose to ensure that the
    data is consistent with the state of the file system; this means that you will never see
    garbage data in recently-written files after a crash. The safe choice, keeping the data
    consistent with the state of the file system, is the default.
    Speed
    Despite writing some data more than once, ext3 is often faster (higher throughput) than
    ext2 because ext3's journaling optimizes hard drive head motion. You can choose from
    three journaling modes to optimize speed, optionally choosing to trade off some data
    integrity.
    1. One mode, data=writeback, limits the data integrity guarantees, allowing old data to
    show up in files after a crash, for a potential increase in speed under some circumstances.
    (This mode, which is the default journaling mode for most journaling file systems,
    essentially provides the more limited data integrity guarantees of the ext2 file system and
    merely avoids the long file system check at boot time.)
    2. The second mode, data=ordered (the default mode), guarantees that the data is
    consistent with the file system; recently-written files will never show up with garbage
    contents after a crash.

    3. The last mode, data=journal, requires a larger journal for reasonable speed in most
    cases and therefore takes longer to recover in case of unclean shutdown, but is sometimes
    faster for certain database operations.
    The default mode is recommended for general-purpose computing needs. To change the
    mode, add the data=something option to the mount options for that file system in the
    /etc/fstab file, as documented in the mount man page (man mount).
    Easy Transition
    It is easy to change from ext2 to ext3 and gain the benefits of a robust journaling file
    system, without reformatting. That's right, there is no need to do a long, tedious, and
    error-prone backup-reformat-restore operation in order to experience the advantages of
    ext3. There are two ways to perform the transition:
    1. The Red Hat Linux installation program offers to transition your file systems when
    you upgrade your system. All you have to do is select one checkbox per file system.
    The tune2fs program can add a journal to an existing ext2 file system. If the file system is
    already mounted while it is being transitioned, the journal will be visible as the file
    .journal in the root directory of the file system. If the file system is not mounted, the
    journal will be hidden and will not appear in the file system. Just run tune2fs -j /dev/hda1
    (or whatever device holds the file system you are transitioning) and change ext2 to ext3
    on the matching lines in /etc/fstab. If you are transitioning your root file system, you will
    have to use an initrd to boot. Run the
    mkinitrd program as described in the manual and make sure that your LILO or GRUB
    configuration loads the initrd. (If you fail to make that change, the system will still boot,
    but the root file system will be mounted as ext2 instead of ext3 - you can tell this by
    looking at the output of the command cat

    Rate this question:

  • 40. 

    What is the simplest and most direct command to check the integrity of an Ext2 file system?

    • Fsck.ext2

    • Fsck -t ext2

    • E2fsck

    • Ext2fsck

    • None of the above

    Correct Answer
    A. E2fsck
    Explanation
    e2fsck is used to check alinux second extended file system as well

    as
    third extended file jystem (containing journal in ext2 filesystem). After the

    journal
    has been applied a filesystem will normally be marked as clean. Hence, for ext3
    filesystems, e2fsck will normally run the journal and exit, unless its superblock
    indicates that further checking is required.

    Rate this question:

  • 41. 

    Which utility on a system will report any excessive file system space remaining with very few inodes still available?

    • Fsck

    • Debugfs

    • Sync

    • Showfiles

    • Softlinks

    Correct Answer
    A. Fsck
    Explanation
    fsck checks and repair the Linux File system. While checking the
    filesystem it returns the error code
    0 : No Errors
    1 : File System Errors corrected
    2 : System should be rebooted
    4 : File system errors left uncorrected
    8 : Operational error
    16 : Usage or Syntax error
    32 : Fsck canceled by user request
    # fsck /dev/hda1 : It will check the filesystem error of /dev/hda1

    Rate this question:

  • 42. 

    What options will allow a normal user to mount and then unmount a file systemwithout needing assistance from the root user?

    • User and users in the /etc/fstab

    • User and users in the /etc/default/

    • User and users in the /etc/vfstab

    • User and users in the /etc/mnttab

    • Usrquota and grpquota in the /etc/fstab

    Correct Answer
    A. User and users in the /etc/fstab
    Explanation
    allow a user to mount
    Owner : allow device owner to mount
    Pamconsole : allow a user at the console to mount

    Rate this question:

  • 43. 

    Which THREE of the following commands are used when setting up and accessing anew filesystem on the hard drive?

    • Fsck

    • Mkfs

    • Mount

    • Fdisk

    • Format

    Correct Answer(s)
    A. Mkfs
    A. Mount
    A. Fdisk
    Explanation
    One large disks convert into multiple small paritions using fdisk,
    sfdisk, GNU parted etc tools. After creating the small partitions needs to create the
    filesystem into the partitions. After creating the filesystem needs to mount on
    directory only after user can use the partition.
    Create the partitionàCreate the filesystemà Mount the filesystem

    Rate this question:

  • 44. 

    When the system is mounted, all file systems in the /etc/fstab are mounted, exceptthose with what in the option column?

    • Nomount

    • Noauto

    • Noatime

    • Nohup

    Correct Answer
    A. Noauto
    Explanation
    noauto : Can only be mounted explicitly ( the -a option will not cause the file system to be mounted).

    Rate this question:

  • 45. 

     Which two programs will allow you to change the priority of a program already running?(Choose two)

    • Top

    • Nice

    • Niceit

    • Renice

    • Chnice

    Correct Answer(s)
    A. Top
    A. Renice
    Explanation
    Renice alters the scheduling priority of one or more running
    processes.
    Example: # renice -20 -p 3042 : Which sets the -20 priority to process having 3042 PID.

    Rate this question:

  • 46. 

    What is the most popular file system choice?

    • Ext2

    • Bsdf

    • Jfs

    • Ext3

    Correct Answer
    A. Ext2
    Explanation
    Ext3 is the newer filesystem in linux having more advantages the older
    ext2 filesystem.
    What are the advantages of ext3?Why do you want to migrate from ext2 to ext3? Four
    main reasons: availability, data integrity, speed, and easy transition.
    Availability
    After an unclean system shutdown (unexpected power failure, system crash), each ext2
    file system cannot be mounted until its consistency has been checked by the e2fsck
    program. The amount of time that the e2fsck program takes is determined primarily by
    the size of the file system, and for today's relatively large (many tens of gigabytes) file
    systems, this takes a long time. Also, the more files you have on the file system, the
    longer the consistency check takes. File systems that are several hundreds of gigabytes in
    size may take an hour or more to check. This severely limits availability.
    By contrast, ext3 does not require a file system check, even after an unclean system
    shutdown, except for certain rare hardware failure cases (e.g. hard drive failures). This is
    because the data is written to disk in such a way that the file system is always consistent.
    The time to recover an ext3 file system after an unclean system shutdown does not
    depend on the size of the file system or the number of files; rather, it depends on the size
    of the "journal" used to maintain consistency. The default journal size takes about a
    second to recover (depending on the speed of the hardware).
    Data Integrity
    Using the ext3 file system can provide stronger guarantees about data integrity in case of
    an unclean system shutdown. You choose the type and level of protection that your data
    receives. You can choose to keep the file system consistent, but allow for damage to data
    on the file system in the case of unclean system shutdown; this can give a modest speed
    up under some but not all circumstances. Alternatively, you can choose to ensure that the
    data is consistent with the state of the file system; this means that you will never see
    garbage data in recently-written files after a crash. The safe choice, keeping the data
    consistent with the state of the file system, is the default.
    Speed
    Despite writing some data more than once, ext3 is often faster (higher throughput) than
    ext2 because ext3's journaling optimizes hard drive head motion. You can choose from
    three journaling modes to optimize speed, optionally choosing to trade off some data
    integrity.
    1. One mode, data=writeback, limits the data integrity guarantees, allowing old data to
    show up in files after a crash, for a potential increase in speed under some circumstances.
    (This mode, which is the default journaling mode for most journaling file systems,
    essentially provides the more limited data integrity guarantees of the ext2 file system and
    merely avoids the long file system check at boot time.)
    2. The second mode, data=ordered (the default mode), guarantees that the data is
    consistent with the file system; recently-written files will never show up with garbage
    contents after a crash.
    3. The last mode, data=journal, requires a larger journal for reasonable speed in most
    cases and therefore takes longer to recover in case of unclean shutdown, but is sometimes
    faster for certain database operations.
    The default mode is recommended for general-purpose computing needs. To change the
    mode, add the data=something option to the mount options for that file system in the
    /etc/fstab file, as documented in the mount man page (man mount).
    Easy Transition
    It is easy to change from ext2 to ext3 and gain the benefits of a robust journaling file
    system, without reformatting. That's right, there is no need to do a long, tedious, and
    error-prone backup-reformat-restore operation in order to experience the advantages of
    ext3. There are two ways to perform the transition:
    1. The Red Hat Linux installation program offers to transition your file systems when
    you upgrade your system. All you have to do is select one checkbox per file system.
    2. The tune2fs program can add a journal to an existing ext2 file system. If the file
    system is already mounted while it is being transitioned, the journal will be visible as the
    file .journal in the root directory of the file system. If the file system is not mounted,
    the journal will be hidden and will not appear in the file system. Just run tune2fs -j
    /dev/hda1 (or whatever device holds the file system you are transitioning) and change
    ext2 to ext3 on the matching lines in /etc/fstab. If you are transitioning your root file
    system, you will have to use an initrd to boot. Run the mkinitrd program as described
    in the manual and make sure that your LILO or GRUB configuration loads the initrd. (If
    you fail to make that change, the system will still boot, but the root file system will be
    mounted as ext2 instead of ext3 - you can tell this by looking at the output of the
    command cat /proc/mounts.) More information on tune2fs can be found in the
    tune2fs man page (man tune2fs).

    Rate this question:

  • 47. 

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

    • /sbin/mke2fs -d /dev/hda2

    • /sbin/mke2fs -j /dev/hda2

    • /sbin/mke2fs -m 3 /dev/hda2

    • /sbin/mke2fs -c ext3 /dev/hda2

    Correct Answer
    A. /sbin/mke2fs -j /dev/hda2
    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.

    Rate this question:

  • 48. 

    According to the Linux File System Hierarchy Standard, which one of the followingdirectories is shareable and for static application files?

    • /opt

    • /var

    • /var/log

    • /etc

    • /usr

    Correct Answer
    A. /usr
    Explanation
    The Linux File system Hierarchy

    Rate this question:

  • 49. 

    A user needs to search a file for lines that contain the asterisk (*) character. Whichgrep search command will accomplish this? Choose all that apply.

    • Grep \* textfile

    • Grep '*' textfile

    • Grep "*" textfile

    • Grep \ textfile

    • Grep "'*'" textfile

    Correct Answer(s)
    A. Grep \* textfile
    A. Grep '*' textfile
    A. Grep "*" textfile
    Explanation
    grep, sed, tail, head, less, sort, cut etc are string processing tools,
    which uses different symbls to match the pattern.
    Whildcard Charaacter:
    . àAny Single Character
    * àzero or more character
    [abc] àAny Single Character from the range
    [^abc] àAny Single Character except from the range
    Similarly Anchors
    ^ àLine beigns with
    $ àLine ends with
    \< àWord beigns with
    \> àWord ends with
    So grep search the pattern and displays all lines matching the pattern. But * is the
    meaningfull character so to kill the meaning of meaningfull characters should use \.

    Rate this question:

Quiz Review Timeline (Updated): Mar 15, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 15, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 10, 2009
    Quiz Created by
    Tobyyy
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.