Topic4: Devices, Linux Filesystems, Filesystems Hierarchy Standards (90) Flashcards

1
Q

Westminster Road

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. Attic

umask value will result in default access permissions of 600 (rw——) for files and 700 (rwx——–) for directories

A

0077

077

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. Attic Fan

cmd unmount /mnt with error message. umount: /mnt: device is busy

A

user has a file open in /mnt directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. Stairs

cmd used to modify quota settings

A

edquota

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. 2nd floor landing

following cmds will mount an already inserted CDROM in /dev/sr0 onto an existing directory /mnt/cdrom when issued with root priv

A

mount -t cdrom /dev/sr0 /mnt/cdrom

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Back stairs to first floor

in compliance with FHS what directories are doc files found

A

/var/share/doc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. 2nd FLoor Bathroom Shower

common linux cmds for file management

A

mv

cp

mkdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. 2nd Floor Bathroom Closet

cmd display inode usege of each mounted filesystem

A

df -i

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. 2nd floor Bathroom Window

cmd shows all libraries required by binary executable or another shared library

A

ldd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. 2nd Floor Bathroom Toilet

SysV init config file used to set default run level

A

inittab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. 2nd floor bathroom Mirror

instead of supplying explicit device in /etc/fstab for mounting, what other options may be used to id the intended partition

A

LABEL

UUID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. 2nd floor Bathroom door

option must be passed to a filesystems entry in /etc/fstab in order to mount the file system without root priveleges

A

user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Christine’s Room Dresser

cmd will change CR-LF pairs in an imported text file, userlist.txt to linux standard LF characters and store it as newlist.txt

A

tr -d ‘\r’ < userlist.txt > newlist.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Christine’s Bookshelf

normal mode in VI what char can be used to begin a reverse search

A

?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. Christine’s Window

chown cmd will change ownership to dave and the group to staff on a file named data.txt

A

chown dave:staff data.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. Christine’s Bed

what does mount -a do

A

mounts all filesystems listed in /etc/fstab that have option auto set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  1. Christine’s Door

vi editor what cmd will copy (but not paste) from current line at the cursor and the following 16 lines (17 lines total).

A

17yy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  1. My Room Dresser

cmd shows definition of given shell cmd

A

type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  1. My Bed

process ID number of init process on a SysV init based system

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  1. My WIndow 1

cmd used to search executable file foo when it has been placed in a directory not included in $PATH

A

find

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  1. My Window 2

cmd print working directory in bash shell

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

21, My Desk

FHS where should binaries that have been compiled by sys admin be placed in order to be made available to all users on the system

A

/usr/local/bin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
  1. My Book Case

cmd changes ownership of file.txt to the user dan and the group staff

A

chown dan:staff file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
  1. My Closet

describes a difference between GHU GRUB Legacy and GRUB 2

A

Partition numbers start at 0 in GRUP Legacy and 1 in GRUB 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q
  1. My Door

cmd used to create an initialize the files used to store quota info

A

quotacheck

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

25 2nd floor Bannister

whats true about hard linked files

A

SAME
permissions and owner

inode

 filesystem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q
  1. Dad’s Master Bedroom Standing Dresser

cmd used to query info about available packages on Debian system

A

apt-cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q
  1. Dad’s Master Bathroom Scrolltop Desk

list of files that would be installed by RPM package file apache-xml.rpm be previewed

A

rpm -qpl apache-xml.rpm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q
  1. Dad’s Master Bathroom Window

filesystem preallocates fixed number of inodes at the filesystem’s make/creation time and does NOT generate them as needed

A

ext2

ext3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q
  1. Dad’s Master Bedroom Bedside Table L

info of existing file is changed when hard link pointing to that file is created

A

Link count

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q
  1. Dad’d Master Bedroom Bed Headboard

cmd creates ext3 filesystem on /dev/sdb1

A

/sbin/mke2fs -j /dev/sdb1

/sbin/mkfs -t ext3 /dev/sdb1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q
  1. Dad’s Master Bedroom Bed

partition type used for linux swap spaces when partitioning hard disk space

A

83

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q
  1. Dad’s Master Bedroom Bedside Table R

cmd will print important system information such as kernel version and machine hardware architecture

A

uname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q
  1. Dad’s Master Bedroom Right side Window

cmd prints a list of available package updates when using RPM based pkg management

A

dpkg check-update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q
  1. Dad’s Master Bedroom Walk-in Closet

cmd reads and displays contents of Kernel Ring Buffer on the cmd line

A

dmesg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

35 Dad’s Master Bedroom Bathroom multi jet shower

cmd creates swap space or block device or a file

37
Q
  1. Dad’s Master Bedroom Bathroom toilet

option to the tee cmd will cause the output to be concat on the end of the output file instead of overwriting the existing file contents

38
Q
  1. Dad’s Master Bedroom Bathroom window

file permissions belong to symbolic link

A

lrwxrwxrwx

39
Q
  1. Dad’s Master Bedroom Bathroom Mirror

limitation of cut cmd

A

cannot reorder fields

40
Q
  1. Dad’s Master Bedroom Bathroom sink

filesystems used on Linux root partitions

41
Q
  1. Dad’s Master Bedroom Door

cmd changes all occurrences of the word “bob” in file data to “Bob” and prints the result to standard output

A

sed ‘s/bob/Bob/g’ data

42
Q
  1. 2nd Floor Main Staircase

cmd will change quota for specific user

43
Q
  1. 1st landing floor step

when piping the output of find to xargs cmd when option to find is useful if the filenames have spaces in them

44
Q
  1. Living Room fireplace

examples for bash flle globbing matches a file named root-can-do-this.txt when used in the directory holding that file

A

root*can?do-this.{txt,odt}

r[oOoO]t-can-do*.txt

{root,user,admin}-can-??-this.txt

45
Q
  1. Living Room tapestry

produce following output

46
Q
  1. Living Room side table L

cmd load kernel module along with any required dependency

47
Q
  1. Living Room couch

what does cmd mount -a do

A

ensures that all file systems listed with the option auto in /etc/fstab are mounted

48
Q
  1. Living Room Big WIndow behind couch

describe boot order

A

BIOS, bootloader, kernel, init system

49
Q
  1. Living Room side table R

how is symbolic link called bar.conf pointing to foo.conf created

A

ln -s foo.conf bar.conf

50
Q
  1. Door to Porch

file in /proc describes IRQs that are used by various kernel drivers

A

interrupts

51
Q
  1. Porch Couch

cmd updates already installed RPM pckage rpmname

A

rpm -U rpmname

52
Q
  1. Porch Desk

creating hard link to an ordinary file returns and error - what would be the reason

A

Source and target on different filesystems

53
Q
  1. Porch TV

how many fields are in syntactically correct line of /etc/fstab

54
Q
  1. Porch WIndow

cmds used to change metadata and options for ext3 filesystem

55
Q
  1. Living Room Pub Set

what does the cmd grub-install /dev/sda do

A

GRUB installs all required files and configures the boot loader on device/dev/sda

56
Q
  1. Living Room Chair 1

cmd sets stickybit

A

chmod +t /tmp

chmod 1775 /tmp

57
Q
  1. Living Room Chair 2

cmd makes already defined variable TEST visible to new child processes

A

export TEST

58
Q

57 Living Room Bookcase 1

settins for umask ensures that new files have default permissions rw-r——

59
Q
  1. Living Room Bookcase 2

apt-get cmd will install newest version of all currently installed packages

A

dist-upgrade

60
Q
  1. Living Room Stereo Cabinet

what is true about command ending with a & character

A

command is run in background of the current shell

61
Q
  1. Living Room TV

file from /proc file system contains a list of all currently mounted devices

62
Q

61 Living Room Step Up to Kitchen Landing

cmd converts spaces in a file to tab characters and prints the result to std output

63
Q
  1. Breakfast Nook Table

cmd changes number of days before the ext3 filesystem on /dev/sda1 has run through a full filesystem check while booting

A

tune2fs -i 200 /dev/sda1

64
Q
  1. Breakfast Nook Fish Tank

utility would be used to change how often a filesystem check is performed on ex2 filesystem without losing any data stored on that filesystem

65
Q
  1. Breakfast Nook Phone

command lines create or in case it already exists, overwrites a file called data with output of ls

66
Q
  1. 1st floor Bathroom toilet

signal sent by kill cmd by default

A

SIGTERM(15)

67
Q
  1. 1st floor Bathroom sink

program updates database that is used by locate command

68
Q
  1. 1st floor Bathroom Cabinet

cmd instructs SysVinit to reload its config file

69
Q
  1. Side door to outside

device file name for second partition on the only SCSI rive

70
Q
  1. Kitchen Refrigeratior

cmd used to locate programs and their corresponding man pages and config files

71
Q
  1. Kitchen Oven

cmd can be used to create new files that is 100kB in size

72
Q
  1. Kitchen Window

cmd changes the nice level of running process

73
Q
  1. Kitchen Sink

using reg expression which of the following characters match the beginning of a line

74
Q
  1. Kitchen Toaster Oven

cmd makes /bin/foo executable by everyone but writeable only by its owner

A

chmod u=rwx,go=rx /bin/foo

75
Q
  1. Kitchen Countertop

permissions and ownership should the file /etc/passwd have

A

-re-r–r–1 rootroot531 Jun 5 22:45 /etc/passwd

76
Q

75 Kitchen Pantry

when choosing a partition scheme what directories could be considered for separate partitioins

77
Q

76 Dining Room Side Table

cmd will uninstall package but leave its config files in case the package is reinstalled

A

dpkg -r pkgname

78
Q

77 Dining Room Table

modes of vi editor

A

mode
insert

command

79
Q

78 Dining Room Chandileir

pressing Crl-C combo on keyboard will a cmd is executing in the foreground sends this signal code

80
Q

79 Dining Room Window

purpos of FHS

A

distribution neutral description of locations of files and directories

81
Q

80 Dining Room Bar

Where does BIOS search for bootloader

A

on all connected storage media in the defined device boot order

82
Q
  1. Vestibule Coat Closet

purpose of xargs

A

reads standard input and builds up cmd lines to execute

83
Q
  1. Front Door

cmd enables setuid (suid) permissions on executable /bin/foo

A

chmod 4755 /bin/foo

84
Q
  1. Front Steps

sys config file named_____ commonly used to set the default runlevel

A

/etc/inittab

85
Q
  1. cobblestone path

cmd used to display inode number of given file

86
Q
  1. Sidewalk

moving data to new filesystem how can former path of data be kept intact in order to avoid reconfiguration of existing applications

A

by creating symbolic link from the old to the new path of the data

by mounting the new filesystem on the original path of the data

87
Q
  1. Driveway

type of filesystem created by mkfs when it is executed with the block device name only and without any additional parameters

88
Q
  1. Side Porch

in bash inserting 2>$1 after a command redirects

A

standard output to standard error