Topic 14 – Files and directories Flashcards
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
describe
Multipurpose Internet Mail Extensions (MIME)
describe the linux directory
/lib
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)
this is a path that starts from the root directory. For linux this is the / and for windows this is the drive letter
what is an
absolute path
what is a
relative path
this is a sequence of a path that is assumed to start in the current working directory
this directory will hold a home subdirectory for each user. A user should not be able to view another users home directory
describe the linux directory
/home
under which two circumstances is an operating system concerned about a
files type
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
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)
describe the linux directory
/lib
this directory contains the configuration files for the system.
There will be many such files and directories specific to particular applications
describe the linux directory
/etc
describe the linux directory
/boot
this directory contains all the files required to start (bootstrap) the system
These allow files and subdirectories to be held inside them and also holds the details of those files
describe a
directory
- 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
describe the
directory hierarchy
of linux and windows
describe the output of the linux command
ls -l
this will display files and directories in a list format where:
- columns contain metadata
- rows contain each file or diretory
the steps for this include:
- A user agent sends a jpg image
- The non ASCII data is translated to NVT 7-bit data which SMTP can understand and send
- A Multi-purpose Internet Mail Extensions (MIME) header is attached with the file including its type image/jpg
- The receiving user agent converts it back to non ASCII code
- The receiving application can now decide what application should be used to read the file using the type header
give an example of
Multipurpose Internet Mail Extensions (MIME)
sending a jpg
describe the linux directory
/root
this is a home directory that is reserved for the root user to keep files
this windows directory contains dynamic link libraries (DLL) and utility programs
describe the windows directory
Windows/system32
describe the windows directory
Windows
this directory contains files that relate to the windows operating system
this directory contains all the files required to start (bootstrap) the system
describe the linux directory
/boot
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
describe the linux directory
/dev
name 8 services/operations that the file system module can carry out on behalf of the shell
this provides for the shell the following services/operations
- create
- read
- write
- rename
- delete
- copy
- ensure permissions are upheld
- ensure that data is stored permanently
how does linux and windows
determine the type of a file
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)
This is used to display files and directories within linux
describe the linux command
ls
this is a sequence of a path that is assumed to start in the current working directory
what is a
relative path
describe the linux directory
/mnt
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.
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.
describe the linux directory
/opt
name 2 advantages of
directories
advantages include:
- allow for a hierarchical organisation of files and subdirectories
- allowing files in different directories to share the same name
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
name an advantage of
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
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
ls -l
will append indicators to the end of file names such as
- / for a directory
- * for an executable
describe the output of the linux command
Ls -F
describe the linux directory
/etc
this directory contains the configuration files for the system.
There will be many such files and directories specific to particular applications
describe the windows directory
Windows/system32
this windows directory contains dynamic link libraries (DLL) and utility programs
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
ls -lh