39.1: File 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/36

encourage image

There's no tags or description

Looks like no tags are added yet.

37 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