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

(88 cards)

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
24. My Door cmd used to create an initialize the files used to store quota info
quotacheck
26
25 2nd floor Bannister whats true about hard linked files
SAME permissions and owner inode filesystem
27
26. Dad's Master Bedroom Standing Dresser cmd used to query info about available packages on Debian system
apt-cache
28
27. Dad's Master Bathroom Scrolltop Desk list of files that would be installed by RPM package file apache-xml.rpm be previewed
rpm -qpl apache-xml.rpm
29
28. 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
ext2 ext3
30
29. Dad's Master Bedroom Bedside Table L info of existing file is changed when hard link pointing to that file is created
Link count
31
30. Dad'd Master Bedroom Bed Headboard cmd creates ext3 filesystem on /dev/sdb1
/sbin/mke2fs -j /dev/sdb1 /sbin/mkfs -t ext3 /dev/sdb1
32
31. Dad's Master Bedroom Bed partition type used for linux swap spaces when partitioning hard disk space
83
33
32. Dad's Master Bedroom Bedside Table R cmd will print important system information such as kernel version and machine hardware architecture
uname
34
33. Dad's Master Bedroom Right side Window cmd prints a list of available package updates when using RPM based pkg management
dpkg check-update
35
34. Dad's Master Bedroom Walk-in Closet cmd reads and displays contents of Kernel Ring Buffer on the cmd line
dmesg
36
35 Dad's Master Bedroom Bathroom multi jet shower cmd creates swap space or block device or a file
mkswap
37
36. 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
-a
38
37. Dad's Master Bedroom Bathroom window file permissions belong to symbolic link
lrwxrwxrwx
39
38. Dad's Master Bedroom Bathroom Mirror limitation of cut cmd
cannot reorder fields
40
40. Dad's Master Bedroom Bathroom sink filesystems used on Linux root partitions
ext3 swap
41
41. 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
sed 's/bob/Bob/g' data
42
42. 2nd Floor Main Staircase cmd will change quota for specific user
edquota
43
43. 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
-print0
44
44. 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
root*can?do-this.{txt,odt} r[oOoO]t-can-do*.txt {root,user,admin}-can-??-this.txt
45
45. Living Room tapestry produce following output
ps
46
46. Living Room side table L cmd load kernel module along with any required dependency
modprobe
47
47. Living Room couch what does cmd mount -a do
ensures that all file systems listed with the option auto in /etc/fstab are mounted
48
48. Living Room Big WIndow behind couch describe boot order
BIOS, bootloader, kernel, init system
49
49. Living Room side table R how is symbolic link called bar.conf pointing to foo.conf created
ln -s foo.conf bar.conf
50
50. Door to Porch file in /proc describes IRQs that are used by various kernel drivers
interrupts
51
51. Porch Couch cmd updates already installed RPM pckage rpmname
rpm -U rpmname
52
52. Porch Desk creating hard link to an ordinary file returns and error - what would be the reason
Source and target on different filesystems
53
53. Porch TV how many fields are in syntactically correct line of /etc/fstab
6
54
53. Porch WIndow cmds used to change metadata and options for ext3 filesystem
tune2fs
55
54. Living Room Pub Set what does the cmd grub-install /dev/sda do
GRUB installs all required files and configures the boot loader on device/dev/sda
56
55. Living Room Chair 1 cmd sets stickybit
chmod +t /tmp chmod 1775 /tmp
57
56. Living Room Chair 2 cmd makes already defined variable TEST visible to new child processes
export TEST
58
57 Living Room Bookcase 1 settins for umask ensures that new files have default permissions rw-r------
0027
59
58. Living Room Bookcase 2 apt-get cmd will install newest version of all currently installed packages
dist-upgrade
60
59. Living Room Stereo Cabinet what is true about command ending with a & character
command is run in background of the current shell
61
60. Living Room TV file from /proc file system contains a list of all currently mounted devices
mounts
62
61 Living Room Step Up to Kitchen Landing cmd converts spaces in a file to tab characters and prints the result to std output
unexpand
63
62. Breakfast Nook Table cmd changes number of days before the ext3 filesystem on /dev/sda1 has run through a full filesystem check while booting
tune2fs -i 200 /dev/sda1
64
63. 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
tune2fs
65
64. Breakfast Nook Phone command lines create or in case it already exists, overwrites a file called data with output of ls
ls > data
66
65. 1st floor Bathroom toilet signal sent by kill cmd by default
SIGTERM(15)
67
66. 1st floor Bathroom sink program updates database that is used by locate command
updatedb
68
67. 1st floor Bathroom Cabinet cmd instructs SysVinit to reload its config file
telinit q
69
68. Side door to outside device file name for second partition on the only SCSI rive
/dev/sda2
70
69. Kitchen Refrigeratior cmd used to locate programs and their corresponding man pages and config files
whereis
71
70. Kitchen Oven cmd can be used to create new files that is 100kB in size
dd
72
71. Kitchen Window cmd changes the nice level of running process
renice
73
72. Kitchen Sink using reg expression which of the following characters match the beginning of a line
^
74
73. Kitchen Toaster Oven cmd makes /bin/foo executable by everyone but writeable only by its owner
chmod u=rwx,go=rx /bin/foo
75
74. Kitchen Countertop permissions and ownership should the file /etc/passwd have
-re-r--r--1 rootroot531 Jun 5 22:45 /etc/passwd
76
75 Kitchen Pantry when choosing a partition scheme what directories could be considered for separate partitioins
/home
77
76 Dining Room Side Table cmd will uninstall package but leave its config files in case the package is reinstalled
dpkg -r pkgname
78
77 Dining Room Table modes of vi editor
mode insert command
79
78 Dining Room Chandileir pressing Crl-C combo on keyboard will a cmd is executing in the foreground sends this signal code
2(SIGINT)
80
79 Dining Room Window purpos of FHS
distribution neutral description of locations of files and directories
81
80 Dining Room Bar Where does BIOS search for bootloader
on all connected storage media in the defined device boot order
82
81. Vestibule Coat Closet purpose of xargs
reads standard input and builds up cmd lines to execute
83
82. Front Door cmd enables setuid (suid) permissions on executable /bin/foo
chmod 4755 /bin/foo
84
83. Front Steps sys config file named_____ commonly used to set the default runlevel
/etc/inittab
85
84. cobblestone path cmd used to display inode number of given file
ls
86
85. Sidewalk moving data to new filesystem how can former path of data be kept intact in order to avoid reconfiguration of existing applications
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
86. Driveway type of filesystem created by mkfs when it is executed with the block device name only and without any additional parameters
ext2
88
87. Side Porch in bash inserting 2>$1 after a command redirects
standard output to standard error