Update README.md (#368)

* Update README.md
This commit is contained in:
mishal zakeer 2023-05-27 23:15:15 +05:30 committed by GitHub
parent 49a0de3c7c
commit d5597c0d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 4 deletions

View File

@ -3503,6 +3503,11 @@ Read about it [here](https://en.wikipedia.org/wiki/Cache_replacement_policies)
<details>
<summary>Why not writing everything to cache instead of a database/datastore?</summary><br><b>
Caching and databases serve different purposes and are optimized for different use cases.
Caching is used to speed up read operations by storing frequently accessed data in memory or on a fast storage medium. By keeping data close to the application, caching reduces the latency and overhead of accessing data from a slower, more distant storage system such as a database or disk.
On the other hand, databases are optimized for storing and managing persistent data. Databases are designed to handle concurrent read and write operations, enforce consistency and integrity constraints, and provide features such as indexing and querying.
</b></details>
#### Migrations

View File

@ -237,7 +237,8 @@ find . -iname "*.yaml" -exec sed -i "s/1/2/g" {} \;
<details>
<summary>How to check which commands you executed in the past?</summary><br><b>
history command or .bash_history file
history command or .bash_history file
* also can use up arrow key to access or to show the recent commands you type
</b></details>
<details>
@ -280,24 +281,37 @@ Alternatively if you are using a distro with systemd it's recommended to use sys
<details>
<summary>Explain Linux I/O redirection</summary><br><b>
In Linux, IO redirection is a way of changing the default input/output behavior of a command or program. It allows you to redirect input and output from/to different sources/destinations, such as files, devices, and other commands.
Here are some common examples of IO redirection:
* Redirecting Standard Output (stdout):
<code>ls > filelist.txt</code>
* Redirecting Standard Error (stderr):
<code>ls /some/nonexistent/directory 2> error.txt</code>
* Appending to a file:
<code>echo "hello" >> myfile.txt</code>
* Redirecting Input (stdin):
<code>sort < unsorted.txt</code>
* Using Pipes: Pipes ("|"):
<code>ls | grep "\.txt$"</code>
</b></details>
<details>
<summary>Demonstrate Linux output redirection</summary><br><b>
ls > ls_output.txt
<code>ls > ls_output.txt</code>
</b></details>
<details>
<summary>Demonstrate Linux stderr output redirection</summary><br><b>
yippiekaiyay 2> ls_output.txt
<code>yippiekaiyay 2> ls_output.txt</code>
</b></details>
<details>
<summary>Demonstrate Linux stderr to stdout redirection</summary><br><b>
yippiekaiyay &> file
<code>yippiekaiyay &> file</code>
</b></details>
<details>
@ -362,6 +376,7 @@ The command passed to the boot loader to run the kernel
<details>
<summary>In which path can you find the system devices (e.g. block storage)?</summary><br><b>
/dev
</b></details>
<a name="questions-linux-permissions"></a>
@ -2261,6 +2276,14 @@ It's used in commands to mark the end of commands options. One common example is
<details>
<summary>What is User-mode Linux?</summary><br><b>
In Linux, user mode is a restricted operating mode in which a user's application or process runs. User mode is a non-privileged mode that prevents user-level processes from accessing sensitive system resources directly.
In user mode, an application can only access hardware resources indirectly, by calling system services or functions provided by the operating system. This ensures that the system's security and stability are maintained by preventing user processes from interfering with or damaging system resources.
Additionally, user mode also provides memory protection to prevent applications from accessing unauthorized memory locations. This is done by assigning each process its own virtual memory space, which is isolated from other processes.
In contrast to user mode, kernel mode is a privileged operating mode in which the operating system's kernel has full access to system resources, and can perform low-level operations, such as accessing hardware devices and managing system resources directly.
</b></details>
<details>