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
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
/tmp
describe the linux directory
/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.
describe the linux directory
/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
where are
file associations
stored within linux and windows
these are stored:
- linux
- /usr/share/applications
- windows
- registry
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
Dynamic Link Library (DLL)
describe the linux command
Type command
this will tell you if a command is built in to the terminal and give the executable path
describe a
root directory
this is the master or top level directory in which all other directories are a subdirectory of
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
/proc
describe
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
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
describe the linux directory
/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
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
delimeter
describe the linux command
Which command
will return the path of the commands executable
describe the output of the linux command
Ls -F
will append indicators to the end of file names such as
- / for a directory
- * for an executable
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
describe a
directory
These allow files and subdirectories to be held inside them and also holds the details of those files
give an example of
Multipurpose Internet Mail Extensions (MIME)
sending a jpg
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
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
/usr
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
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
/bin and /sbin
this directory contains files that relate to the windows operating system
describe the windows directory
Windows
describe the output of the linux command
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
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
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
what are the 7 columns that are output by the linux command
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

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
what is a
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
what is an
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
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
Multipurpose Internet Mail Extensions (MIME)
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
directories
describe the linux command
ls
This is used to display files and directories within linux
directory is intended for files whose content changes continually as the system runs, such as log files.
describe the linux directory
/var
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
name 8 services/operations that the file system module can carry out on behalf of the shell
will return the path of the commands executable
describe the linux command
Which command
describe the linux directory
/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
within a file path what is a
delimeter
this is what separates each directory within a directory path and is denoted as
- forward slash (linux) (URL)
- backslash (windows)
describe the linux directory
/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.
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
ls -l
describe the windows directory:
Program Files
this windows directory contains applications that have been installed
this will tell you if a command is built in to the terminal and give the executable path
describe the linux command
Type command
this windows directory contains applications that have been installed
describe the windows directory:
Program Files
describe the linux directory
/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.
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
determine the type of a file
this is the master or top level directory in which all other directories are a subdirectory of
describe a
root directory
describe the linux directory
/var
directory is intended for files whose content changes continually as the system runs, such as log files.
these are stored:
- linux
- /usr/share/applications
- windows
- registry
where are
file associations
stored within linux and windows
this is a home directory that is reserved for the root user to keep files
describe the linux directory
/root
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
describe the linux directory
/home
this directory will hold a home subdirectory for each user. A user should not be able to view another users home directory
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