Topic 14 – Files and directories Flashcards

1
Q

This was first introduced as an extension to email and allowed emails to send different data other than text.

It also meant that different file types sent across the internet could be understood by different operating systems and applications that were installed

A

describe

Multipurpose Internet Mail Extensions (MIME)

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

describe the linux directory

/lib

A

directory contains shared libraries that are an essential part of the operating system, including

  • kernel modules
  • device drivers
  • other loadable modules (the equivalent of Windows DLLs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

this is a path that starts from the root directory. For linux this is the / and for windows this is the drive letter

A

what is an

absolute path

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

what is a

relative path

A

this is a sequence of a path that is assumed to start in the current working directory

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

this directory will hold a home subdirectory for each user. A user should not be able to view another users home directory

A

describe the linux directory

/home

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

under which two circumstances is an operating system concerned about a

files type

A

an OS would be concerned about this when:

  • distinguishing between a file and directory
  • File association
    • So that it can display different icons within the GUI
    • so that it can execute the appropriate application (this is not a concern within the CLI since the application name is given)

note

in general an OS only ever sees a file as a stream of bytes it is only under a few circumstances upon which it would need to know this

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

directory contains shared libraries that are an essential part of the operating system, including

  • kernel modules
  • device drivers
  • other loadable modules (the equivalent of Windows DLLs)
A

describe the linux directory

/lib

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

this directory contains the configuration files for the system.

There will be many such files and directories specific to particular applications

A

describe the linux directory

/etc

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

describe the linux directory

/boot

A

this directory contains all the files required to start (bootstrap) the system

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

These allow files and subdirectories to be held inside them and also holds the details of those files

A

describe a

directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • linux
    • the root directory is /
    • always maintains a single directory hierarchy starting from /. no matter ho many storage devices are connected
  • windows
    • the root directory is the drive letter of the storage device or partition
    • for each drive letter there is a hieracrchy
A

describe the

directory hierarchy

of linux and windows

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

describe the output of the linux command

ls -l

A

this will display files and directories in a list format where:

  • columns contain metadata
  • rows contain each file or diretory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

the steps for this include:

  1. A user agent sends a jpg image
  2. The non ASCII data is translated to NVT 7-bit data which SMTP can understand and send
  3. A Multi-purpose Internet Mail Extensions (MIME) header is attached with the file including its type image/jpg
  4. The receiving user agent converts it back to non ASCII code
  5. The receiving application can now decide what application should be used to read the file using the type header
A

give an example of

Multipurpose Internet Mail Extensions (MIME)

sending a jpg

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

describe the linux directory

/root

A

this is a home directory that is reserved for the root user to keep files

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

this windows directory contains dynamic link libraries (DLL) and utility programs

A

describe the windows directory

Windows/system32

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

describe the windows directory

Windows

A

this directory contains files that relate to the windows operating system

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

this directory contains all the files required to start (bootstrap) the system

A

describe the linux directory

/boot

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

directory contains special files that represent the devices in the system.

These are not normal files but are interfaces to the device driver for each device.

By representing these devices as files, they can be accessed using basic operations such as read and write

A

describe the linux directory

/dev

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

name 8 services/operations that the file system module can carry out on behalf of the shell

A

this provides for the shell the following services/operations

  1. create
  2. read
  3. write
  4. rename
  5. delete
  6. copy
  7. ensure permissions are upheld
  8. ensure that data is stored permanently
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

how does linux and windows

determine the type of a file

A

these use the following methods

  • windows
    • relies on the file extension
  • linux
    • uses Multipurpose Internet Mail Extensions (MIME) that is embedded into the file (no file extension is required)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

This is used to display files and directories within linux

A

describe the linux command

ls

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

this is a sequence of a path that is assumed to start in the current working directory

A

what is a

relative path

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

describe the linux directory

/mnt

A

A Linux file system always appears as a single tree even if the files are actually stored on different devices.

When a storage device is added to the system, its files are merged into the existing file system.

This directory provides a convenient place for this to happen.

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

this directory is another place where applications programs can be installed.

It is sometimes used by cross-platform applications which have their own method of installation rather than use a Linux package manager.

A

describe the linux directory

/opt

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

name 2 advantages of

directories

A

advantages include:

  • allow for a hierarchical organisation of files and subdirectories
  • allowing files in different directories to share the same name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

name 7 actions that users have come to expect from using files

A

a user expects this to be:

  • Permanent unless explicitly deleted
  • Have a human readable name
  • Modify the contents
  • Copy and transfer
  • Control who can access it
  • Group files together
  • Contain anything but be treated like any other file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

name an advantage of

Multipurpose Internet Mail Extensions (MIME)

A

an advantage of this is that:

SMTP only sends messages in NVT 7-bit ASCII format.

This allowed data not of this type to be sent across the internet via email

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

this will display files and directories in a list format where:

  • columns contain metadata
  • rows contain each file or diretory
A

describe the output of the linux command

ls -l

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

will append indicators to the end of file names such as

  • / for a directory
  • * for an executable
A

describe the output of the linux command

Ls -F

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

describe the linux directory

/etc

A

this directory contains the configuration files for the system.

There will be many such files and directories specific to particular applications

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

describe the windows directory

Windows/system32

A

this windows directory contains dynamic link libraries (DLL) and utility programs

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

will display files and directories in a list format while rounding the size of those files and directories to the nearest kilo mega or gigabyte

A

describe the output of the linux command

ls -lh

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

directory is a place for temporary files,

for example work files used as an application runs, or as a space in which to unpack compressed files.

It should be safe to clean up this directory periodically

A

describe the linux directory

/tmp

34
Q

describe the linux directory

/opt

A

this directory is another place where applications programs can be installed.

It is sometimes used by cross-platform applications which have their own method of installation rather than use a Linux package manager.

35
Q

describe the linux directory

/dev

A

directory contains special files that represent the devices in the system.

These are not normal files but are interfaces to the device driver for each device.

By representing these devices as files, they can be accessed using basic operations such as read and write

36
Q

where are

file associations

stored within linux and windows

A

these are stored:

  • linux
    • /usr/share/applications
  • windows
    • registry
37
Q

this is similar to packages in linux in that these contain code that can be used by applications

multiple applications can be using this at the same time

A

what is a

Dynamic Link Library (DLL)

38
Q

describe the linux command

Type command

A

this will tell you if a command is built in to the terminal and give the executable path

39
Q

describe a

root directory

A

this is the master or top level directory in which all other directories are a subdirectory of

40
Q

directory doesn’t contain normal files but instead provides a file-like interface to each process on the system.

Each process will have an entry in /proc with its process ID appearing as a directory which contains file-like items that can be read to discover information about that running process.

A

describe the linux directory

/proc

41
Q

describe

Multipurpose Internet Mail Extensions (MIME)

A

This was first introduced as an extension to email and allowed emails to send different data other than text.

It also meant that different file types sent across the internet could be understood by different operating systems and applications that were installed

42
Q

will format the directory in a tree like manner while only going the specified number of layers deep

A

describe the output of the linux command

Tree -L number of layers

43
Q

describe the linux directory

/usr

A

this directory contains application and utility programs installed using a package manager such as apt

it uses a file system convention similar to the root directory where The /usr/bin, /usr/sbin and /usr/lib directories are used for similar purposes to /bin, /sbin and /lib

Src and include - theses will hold source code rather than compiled code

Share - this will hold data files associated with a package such as images, icons, man pages

44
Q

this is what separates each directory within a directory path and is denoted as

  • forward slash (linux) (URL)
  • backslash (windows)
A

within a file path what is a

delimeter

45
Q

describe the linux command

Which command

A

will return the path of the commands executable

46
Q

describe the output of the linux command

Ls -F

A

will append indicators to the end of file names such as

  • / for a directory
  • * for an executable
47
Q

a user expects this to be:

  • Permanent unless explicitly deleted
  • Have a human readable name
  • Modify the contents
  • Copy and transfer
  • Control who can access it
  • Group files together
  • Contain anything but be treated like any other file
A

name 7 actions that users have come to expect from using files

48
Q

describe a

directory

A

These allow files and subdirectories to be held inside them and also holds the details of those files

49
Q

give an example of

Multipurpose Internet Mail Extensions (MIME)

sending a jpg

A

the steps for this include:

  1. A user agent sends a jpg image
  2. The non ASCII data is translated to NVT 7-bit data which SMTP can understand and send
  3. A Multi-purpose Internet Mail Extensions (MIME) header is attached with the file including its type image/jpg
  4. The receiving user agent converts it back to non ASCII code
  5. The receiving application can now decide what application should be used to read the file using the type header
50
Q

this directory contains application and utility programs installed using a package manager such as apt

it uses a file system convention similar to the root directory where The /usr/bin, /usr/sbin and /usr/lib directories are used for similar purposes to /bin, /sbin and /lib

Src and include - theses will hold source code rather than compiled code

Share - this will hold data files associated with a package such as images, icons, man pages

A

describe the linux directory

/usr

51
Q

this will search for commands in the conventional places instead of using $PATH.

It is usefull if the $PATH environmental variable is broken.

This also returns the path of the commands configuartion files and man pages

A

describe the linux command

Whereis command

52
Q

these contain essential command-line utilities for the linux system.

They both hold binary files that have already been compiled and are ready to execute.

The bin directory contains the key commands needed to boot up the system or to repair it.

The sbin directory contains additional system administration programs; in some systems only the superuser can execute these.

A

describe the linux directory

/bin and /sbin

53
Q

this directory contains files that relate to the windows operating system

A

describe the windows directory

Windows

54
Q

describe the output of the linux command

ls -lh

A

will display files and directories in a list format while rounding the size of those files and directories to the nearest kilo mega or gigabyte

55
Q

A Linux file system always appears as a single tree even if the files are actually stored on different devices.

When a storage device is added to the system, its files are merged into the existing file system.

This directory provides a convenient place for this to happen.

A

describe the linux directory

/mnt

56
Q

an OS would be concerned about this when:

  • distinguishing between a file and directory
  • File association
    • So that it can display different icons within the GUI
    • so that it can execute the appropriate application (this is not a concern within the CLI since the application name is given)

note

in general an OS only ever sees a file as a stream of bytes it is only under a few circumstances upon which it would need to know this

A

under which two circumstances is an operating system concerned about a

files type

57
Q

what are the 7 columns that are output by the linux command

ls -l

A

the output of this includes:

  • type and access
    • type -such as d for directory and - for a file
    • access - the permissions on the file such as rwxr
  • links - the number of links to the file. links may exist in other directories
  • user - the name of the user that the file belongs to
  • group - the name of the group that the file belongs to
  • size - the size of the file in bytes
  • date - the date that the file was last modified
  • filename - the name of the file
58
Q

describe the output of the linux command

Tree -L number of layers

A

will format the directory in a tree like manner while only going the specified number of layers deep

59
Q

what is a

Dynamic Link Library (DLL)

A

this is similar to packages in linux in that these contain code that can be used by applications

multiple applications can be using this at the same time

60
Q

what is an

absolute path

A

this is a path that starts from the root directory. For linux this is the / and for windows this is the drive letter

61
Q

an advantage of this is that:

SMTP only sends messages in NVT 7-bit ASCII format.

This allowed data not of this type to be sent across the internet via email

A

name an advantage of

Multipurpose Internet Mail Extensions (MIME)

62
Q

advantages include:

  • allow for a hierarchical organisation of files and subdirectories
  • allowing files in different directories to share the same name
A

name 2 advantages of

directories

63
Q

describe the linux command

ls

A

This is used to display files and directories within linux

64
Q

directory is intended for files whose content changes continually as the system runs, such as log files.

A

describe the linux directory

/var

65
Q

this provides for the shell the following services/operations

  1. create
  2. read
  3. write
  4. rename
  5. delete
  6. copy
  7. ensure permissions are upheld
  8. ensure that data is stored permanently
A

name 8 services/operations that the file system module can carry out on behalf of the shell

66
Q

will return the path of the commands executable

A

describe the linux command

Which command

67
Q

describe the linux directory

/tmp

A

directory is a place for temporary files,

for example work files used as an application runs, or as a space in which to unpack compressed files.

It should be safe to clean up this directory periodically

68
Q

within a file path what is a

delimeter

A

this is what separates each directory within a directory path and is denoted as

  • forward slash (linux) (URL)
  • backslash (windows)
69
Q

describe the linux directory

/proc

A

directory doesn’t contain normal files but instead provides a file-like interface to each process on the system.

Each process will have an entry in /proc with its process ID appearing as a directory which contains file-like items that can be read to discover information about that running process.

70
Q

the output of this includes:

  • type and access
    • type -such as d for directory and - for a file
    • access - the permissions on the file such as rwxr
  • links - the number of links to the file. links may exist in other directories
  • user - the name of the user that the file belongs to
  • group - the name of the group that the file belongs to
  • size - the size of the file in bytes
  • date - the date that the file was last modified
  • filename - the name of the file
A

what are the 7 columns that are output by the linux command

ls -l

71
Q

describe the windows directory:

Program Files

A

this windows directory contains applications that have been installed

72
Q

this will tell you if a command is built in to the terminal and give the executable path

A

describe the linux command

Type command

73
Q

this windows directory contains applications that have been installed

A

describe the windows directory:

Program Files

74
Q

describe the linux directory

/bin and /sbin

A

these contain essential command-line utilities for the linux system.

They both hold binary files that have already been compiled and are ready to execute.

The bin directory contains the key commands needed to boot up the system or to repair it.

The sbin directory contains additional system administration programs; in some systems only the superuser can execute these.

75
Q

these use the following methods

  • windows
    • relies on the file extension
  • linux
    • uses Multipurpose Internet Mail Extensions (MIME) that is embedded into the file (no file extension is required)
A

how does linux and windows

determine the type of a file

76
Q

this is the master or top level directory in which all other directories are a subdirectory of

A

describe a

root directory

77
Q

describe the linux directory

/var

A

directory is intended for files whose content changes continually as the system runs, such as log files.

78
Q

these are stored:

  • linux
    • /usr/share/applications
  • windows
    • registry
A

where are

file associations

stored within linux and windows

79
Q

this is a home directory that is reserved for the root user to keep files

A

describe the linux directory

/root

80
Q

describe the linux command

Whereis command

A

this will search for commands in the conventional places instead of using $PATH.

It is usefull if the $PATH environmental variable is broken.

This also returns the path of the commands configuartion files and man pages

81
Q

describe the linux directory

/home

A

this directory will hold a home subdirectory for each user. A user should not be able to view another users home directory

82
Q

describe the

directory hierarchy

of linux and windows

A
  • linux
    • the root directory is /
    • always maintains a single directory hierarchy starting from /. no matter ho many storage devices are connected
  • windows
    • the root directory is the drive letter of the storage device or partition
    • for each drive letter there is a hieracrchy