39: Files and Directories

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/54

encourage image

There's no tags or description

Looks like no tags are added yet.

55 Terms

1
New cards

Persistent Storage

keep a data intact even if there is a power loss

2
New cards

Hard Disk Drive

persistent storage (1)

3
New cards

Solid State Storage Device

persistent storage (2)

4
New cards

File

a linear array of bytes

5
New cards

Inode Number

each file has low-level name as

6
New cards

Store data, disk

filesystem has a responsibility to _ _ persistently on _

7
New cards

Directory

it contains a list of (user-readable name, low-level name) pairs

8
New cards

Open()

use _ system call with O_CREAT flag, in creating files

9
New cards

O_CREAT

create file

10
New cards

O_WRONLY

only write to that file while opened

11
New cards

O_TRUNC

make files size zero (remove any existing content)

12
New cards

File descriptor

open() system call returns _ _

13
New cards

Integer

file descriptor is an _ and is used to access files

14
New cards

File descriptor

what open() returns

15
New cards

Number of bytes

what read() returns

16
New cards

Number of bytes

what write() returns

17
New cards

Current Offset

an open file has a _ _

18
New cards

Current offset

determine where the next read or write will begin reading from or writing to within the file

19
New cards

Implicitly

a read or write of N bytes takes place, N is added to the current offset, update the current offset (1)

20
New cards

Explicitly

lseek(), update the current offset (2)

21
New cards

Fildes

files descriptor

22
New cards

Offset

position the file offset to a particular location within the file

23
New cards

Whence

determine how the seek is performed

24
New cards

Fsync()

the file system will buffer writes in memory for some time

25
New cards

Write

fsync(), _ seem to complete quickly

26
New cards

Disk

fsync(), filesystem forces all dirty data to _ for the file referred to by the file description

27
New cards

Atomic Call

renaming files, it implemented as an atomic call

28
New cards

Metadata

information about each file

29
New cards

Stat

to see stat information, you can use the command line tool _

30
New cards

Inode Structure

file system keeps this type of information in a _ _

31
New cards

Rm

Linux command to remove a file

32
New cards

Unlink()

rm call _ to remove a file

33
New cards

Mkdir()

make a directory

34
New cards

Itself, Parent

empty directory have two entries

35
New cards

Rmdir()

delete a directory

36
New cards

Rmdir()

require that the directory be empty

37
New cards

Hard Links

create another way to refer to the same file

38
New cards

Create another name

the way link works (1)

39
New cards

Refer to same inode number

the way link works (2)

40
New cards

Same Inode Number, Two Human name

result of link()

41
New cards

Reference count

track how many different file names have been linked to this inode

42
New cards

Free Inode and Data Blocks

if the reference count reaches zero, the filesystem _ _ _ _ _ -> truly “delete” the file

43
New cards

Symbolic Link

is more useful than hard link

44
New cards

Directory

hard link cannot create to a _

45
New cards

File, Partition

hard link cannot create to a _ to other _

46
New cards

Unique within

inode numbers are only _ _ a file system

47
New cards

Dangling Reference

when remove a original file, symbolic link points noting

48
New cards

Mkfs

tool, make a file system

49
New cards

Mount()

take an existing directory as a target mount point

50
New cards

Mount()

essentially paste a new file system onto the directory tree at the point

51
New cards

Mount program

show what is mounted on a system

52
New cards

Ext3

a standard disk-based file system

53
New cards

Proc

a file system for accessing information about current processes

54
New cards

Tmpfs

a file system just for temporary files

55
New cards

AFS

a distributed file system