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
name 2 advantages of ## Footnote **directories**
advantages include: * allow for a hierarchical organisation of files and subdirectories * allowing files in different directories to share the same name
26
name 7 actions that users have come to expect from using files
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
27
name an advantage of ## Footnote **Multipurpose Internet Mail Extensions (MIME)**
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
28
this will display files and directories in a list format where: * columns contain metadata * rows contain each file or diretory
describe the output of the linux command ## Footnote **ls -l**
29
will append indicators to the end of file names such as * / for a directory * \* for an executable
describe the output of the linux command ## Footnote **Ls -F**
30
describe the linux directory ## Footnote **/etc**
this directory contains the configuration files for the system. There will be many such files and directories specific to particular applications
31
describe the windows directory Windows/system32
this windows directory contains dynamic link libraries (DLL) and utility programs
32
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
describe the output of the linux command ## Footnote **ls -lh**
33
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
describe the linux directory ## Footnote **/tmp**
34
describe the linux directory ## Footnote **/opt**
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
describe the linux directory ## Footnote **/dev**
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
where are **file associations** stored within linux and windows
these are stored: * linux * /usr/share/applications * windows * registry
37
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
what is a ## Footnote **Dynamic Link Library (DLL)**
38
describe the linux command **Type** *command*
this will tell you if a command is built in to the terminal and give the executable path
39
describe a ## Footnote **root directory**
this is the master or top level directory in which all other directories are a subdirectory of
40
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.
describe the linux directory ## Footnote **/proc**
41
describe ## Footnote **Multipurpose Internet Mail Extensions (MIME)**
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
will format the directory in a tree like manner while only going the specified number of layers deep
describe the output of the linux command **Tree -L** *number of layers*
43
describe the linux directory ## Footnote **/usr**
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
this is what separates each directory within a directory path and is denoted as * forward slash (linux) (URL) * backslash (windows)
within a file path what is a ## Footnote **delimeter**
45
describe the linux command **Which** *command*
will return the path of the commands executable
46
describe the output of the linux command ## Footnote **Ls -F**
will append indicators to the end of file names such as * / for a directory * \* for an executable
47
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
name 7 actions that users have come to expect from using files
48
describe a ## Footnote **directory**
These allow files and subdirectories to be held inside them and also holds the details of those files
49
give an example of ## Footnote **Multipurpose Internet Mail Extensions (MIME)** sending a jpg
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
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
describe the linux directory ## Footnote **/usr**
51
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
describe the linux command **Whereis** *command*
52
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.
describe the linux directory ## Footnote **/bin and /sbin**
53
this directory contains files that relate to the windows operating system
describe the windows directory ## Footnote **Windows**
54
describe the output of the linux command ## Footnote **ls -lh**
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
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.
describe the linux directory /mnt
56
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
under which two circumstances is an operating system concerned about a **files type**
57
what are the 7 columns that are output by the linux command ## Footnote **ls -l**
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
describe the output of the linux command **Tree -L** *number of layers*
will format the directory in a tree like manner while only going the specified number of layers deep
59
what is a ## Footnote **Dynamic Link Library (DLL)**
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
what is an ## Footnote **absolute path**
this is a path that starts from the root directory. For linux this is the / and for windows this is the drive letter
61
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
name an advantage of ## Footnote **Multipurpose Internet Mail Extensions (MIME)**
62
advantages include: * allow for a hierarchical organisation of files and subdirectories * allowing files in different directories to share the same name
name 2 advantages of ## Footnote **directories**
63
describe the linux command ## Footnote **ls**
This is used to display files and directories within linux
64
directory is intended for files whose content changes continually as the system runs, such as log files.
describe the linux directory ## Footnote **/var**
65
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
name 8 services/operations that the file system module can carry out on behalf of the shell
66
will return the path of the commands executable
describe the linux command **Which** *command*
67
describe the linux directory ## Footnote **/tmp**
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
within a file path what is a ## Footnote **delimeter**
this is what separates each directory within a directory path and is denoted as * forward slash (linux) (URL) * backslash (windows)
69
describe the linux directory ## Footnote **/proc**
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
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
what are the 7 columns that are output by the linux command ## Footnote **ls -l**
71
describe the windows directory: ## Footnote **Program Files**
this windows directory contains applications that have been installed
72
this will tell you if a command is built in to the terminal and give the executable path
describe the linux command **Type** *command*
73
this windows directory contains applications that have been installed
describe the windows directory: ## Footnote **Program Files**
74
describe the linux directory ## Footnote **/bin and /sbin**
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
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 does linux and windows ## Footnote **determine the type of a file**
76
this is the master or top level directory in which all other directories are a subdirectory of
describe a ## Footnote **root directory**
77
describe the linux directory ## Footnote **/var**
directory is intended for files whose content changes continually as the system runs, such as log files.
78
these are stored: * linux * /usr/share/applications * windows * registry
where are **file associations** stored within linux and windows
79
this is a home directory that is reserved for the root user to keep files
describe the linux directory ## Footnote **/root**
80
describe the linux command **Whereis** *command*
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
describe the linux directory ## Footnote **/home**
this directory will hold a home subdirectory for each user. A user should not be able to view another users home directory
82
describe the **directory hierarchy** of linux and windows
* 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