Files & Permissions - Ch2 Flashcards

1
Q

FHS

A

File Hierarchy System ;

Specifies directory structure, type of info to store, & how shared

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

Static directory

A

Holds static data & contains user and administrative commands, help files, library files, kernel and boot files;
/usr
/boot
/opt

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

Dynamic directory

A
Holds variable data containing log and spool files, config files, temp files, personal user files
/var
/etc
/tmp
/home
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Static and shareable directories

A

/opt

/usr

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

Static and unshareable

A

/boot

/etc

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

Variable and shareable

A

/var/mail

/var/opt

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

Variable and unshareable

A

/var/lock

/run

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

/etc

A

holds sys config files

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

/root

A

Default home dir of root user

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

/media

A

To auto mount removable media

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

/mnt

A

To temp mount a file system

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

/bin and /usr/bin

A

To store admin commands

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

/lib, /usr/lib, /lib64, /usr/lib64

A

To store 32 and 64 bit library routines needed by various commands and programs

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

touch

A

Creates empty file and sets timestamp

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

cat

A

Create short text file;
ex: cat > catfile1 then enter text;
Press Ctrl+d to save and return to shell prompt

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

vi

A

Create and modify text files

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

mkdir

A

Make directory

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

ls

A

List directories

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

ll

A

List details;

short for ls -l

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

File / directory column information

A

Col 1: First char indicates file “-“ or dir “d”, remaining 9 char indicate permissions
Col 2: No of links
Col 3: Owner name
Col 4: Owning group
Col 5: Size in bytes (files) or blocks (dir)
Col 6,7,8: Mo, day and time of last modification
Col 9: Name of file or dir

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

less

A

Text filter for viewing long text files, forward and backward, before entire file is loaded;

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

more

A

Text filter for viewing long text files forward only

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

cp

A

Copy files and directories

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

mv

A

Move files and directories

25
Q

rm

A

Remove files and directories

26
Q

Regular files

A

May contain text or binary;

Files depicted by hyphen “-“ when listed

27
Q

Directory files

A

Logical containers used to hold files and sub directories

28
Q

Executable files

A

Files that can be run;

Commands in binary format or shell scripts

29
Q

Symbolic link file

A

Shortcut to another file or directory

30
Q

Device file

A

File associated with system hardware used by kernel to communicate with hardware

31
Q

Permission classes

A

User
Group
Other (public)

32
Q

Permission types

A

r read
w write
x execute

33
Q

Permission modes

A

+ add
- revoke
= assign

34
Q

Octal permission notation

A

3 digit num sys (0-7) to express permissions for 3 user classes

35
Q

Octal permission weights

A

Weights assoc with each digit permission

X X X
| | |
4 2 1

ex. .. permission 2 would reference the middle digit
ex. .. permission 6 would reference 2 most left digits

36
Q

chmod

A

Change permissions

37
Q

Symbolic permissions notation

A

x Execute
r Read
w Write

ex… Add execute permiss bit for owner
chmod u+x file1 -v

ex… Add write permiss for group members and public
chmod go+w file1 -v

38
Q

umask

A

User mask;

3 digit octal value referencing r/w/e values for owner group and public

39
Q

Default permissions

A

Initial permissions (666) - umask

40
Q

chown

A

Change ownereship

41
Q

chgrp

A

Change group

42
Q

useradd

A

Create user account

43
Q

Metadata

A

Attributes associated with files… data about data

44
Q

inode

A

Index node;

storage space where metadata is stored

45
Q

Hard link

A

Mapping between one or more filenames and an inode

46
Q

ln

A

Command to create a hard link

47
Q

Soft link

A

Symbolic link which allows associations between files;
Shortcut associations with files;
Each softlink has a unique inode #

48
Q

ln -s

A

Command to create a soft link

49
Q

find

A

Searches for files that match specified criteria

50
Q

Period “.”

A

Represents the current dir
ex… find . -nam e newfile1
Search for file “find” in the current directory

51
Q

Tilda ~

A

Represents current user home dir

52
Q

locate

A

Discover all occurrences of specified string in file pathnames

53
Q

which

A

Prints path to command executed when run

54
Q

whereis

A

Prints path to command executed when run, including path to command’s man pages

55
Q

type

A

Prints path to command executed when run

56
Q

setuid

A

Set user identifier;

provide non owners or groups ability to run executables with owner priveledges

57
Q

setgid

A

Set user identifier;
provide non owners or groups ability to run executables with owner priveledges;
Can be applied to shared dir also

58
Q

sticky bit

A

Applied to public directories for inhibiting file erasures by non-owners.