Everything Flashcards
What are system backups and what achieves
– Copies files and directories to an archive.
– Use to restore data in case of a system failure or
data loss and corruption.
– File containing many other files, each of which is
still identified by its filename, owner, permissions,
and timestamp.
Describe what these core folders contain in debian:
etc/
home/
opt/
root/
var/
srv/
– /etc -contains core configuration files, security
files, network configuration files, user and group
information, etc.
– /home -each user has a /home directory.
– /opt -software and packages added after the
default installation.
– /root -root user’s home directory.
– /var -system-specific information that changes
while the system is running normally.
– /srv -server scripts
What is the Tar Ulitlty?
This is a tool that is used to achieve files into a Tarball
What is a full backup?
Archive of all files on the file system
What is Incremental backup?
Archive containing only files modified since the last backup
What does these operators mean:
> <
I
> : Output
< : Input
I : One command option
What does “cpio” mean?
ls | cpio -o > files.cpio
This is a tool that is used to achieve and extract files (Like Winrar)
What does Gzip mean and what’s the difference between Tar and Gzip and why do we use Tar for Gzip.
The Gzip is a tool that is used for compressing, whilist Tar is used for acheiving (Tarball). Gzip can only compress one file so we tar the files/folders into a achieve (one file) and then compress that file.
What is Cron?
crontab
The configuration file used to specify tasks to run at a
certain time and shell files, commands are ran.
What is a process?
A process refers to an instance of a running program or application within the Debian operating system. A process cannot be created without a process so Partent and Child process exisit.
What is Foreground Process & Background Process?
Backeground: This software/application is ran by the Kernal or other parent processes.
Foreground: This software/application is ran by the User starting the processes.
What is fork and vfork?
Fork creates a new process by duplicating the existing process, while vfork creates a new process without duplicating the entire address space of the parent process, instead sharing the memory of the parent process until the child process calls exec or _exit.
What is wait in processing?
Wait system call is same as fork with one key
difference. The parent goes into a wait state (sleep) until the child
terminates
What is exec in processing?
exec system call causes a process to start a new
program that replaces the current process. In other words, creates a new process which replaces the current process
What is a an Alu?
ALU stands for Arithmetic Logic Unit. It is a key component of a CPU (Central Processing Unit) responsible for performing arithmetic and logical operations on data.
What is the control unit?
The control unit is a crucial component of a CPU (Central Processing Unit) responsible for coordinating and controlling the operations of the entire processor. It manages the flow of data and instructions between different components of the CPU, ensuring that instructions are fetched, decoded, and executed in the correct sequence.
What is top commnad?
This command enables you to monitor the process in linux
What is vmstat command?
Displays the computer hardware performance e.g., the ram is 90% free
What is the Inode?
Data structure that stores all information about a file except the actual data and filename. In a file system, an inode (index node) is a data structure that represents a file or a directory. It serves as a reference or “address” to access and retrieve the properties and metadata associated with the file.
What are soft and hard links? Please tell me the difference aswel.
Soft (Symbolic) and hard links are ways to link files together so if:
/etc/data/cat.txt
/var/log/cat.txt
Had a link, then if /etc/data/cat.txt was edited then /var/log/cat.txt.
The difference is that hard link will create another partition on the hard drive, meaning its like a copy and paste with the linking properties, however soft link will create a partent and child file meaning this takes less space, however if /etc/data/cat.txt was deleted then /var/log/cat.txt, wouldn’t work.
File Space exists two levels of abstraction?
– Logical: Partitions, Directories, Files
– Physical: File Systems, Disk Blocks, Pointers
What are blocks towards storage (Basically how does a file get stored on a hard disk)?
To store a file, it is decomposed into fixed-size blocks. Each block is then stored at a disk location
How does the Kernel locate a particular block of a
disk
– File Systems use an indexing scheme
– In Linux indexing is handled through data
structure
Basically using the Inode, tells us the indexes (almost like keys) of block which are needed for the file so the Inode basically acts like a map.
What pointers (points to block) are within an inode?
Typically, an inode will contain 15 pointers
– 12 Direct pointers
– 1 indirect pointer
– 1 double indirect pointer
– 1 triple indirect pointer
* Indirect pointers point to Indirect Block
* Disk block stores ~1-8Kb
Direct -> Blocks
Indirect -> Blocks
Double -> Indirect -> Blocks
Triple -> Double -> Indirect -> Blocks