From 2089e5f42d45f97ced5d53503b121aea5c15057f Mon Sep 17 00:00:00 2001 From: Aleksey Tsalolikhin <66701226+atsalolikhin-spokeo@users.noreply.github.com> Date: Wed, 20 Oct 2021 21:09:18 -0700 Subject: [PATCH 1/2] cosmetic: Fix typo (#166) --- common-qa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-qa.md b/common-qa.md index a0a5473..1d257c6 100644 --- a/common-qa.md +++ b/common-qa.md @@ -90,4 +90,4 @@ For example: 1. What is horizontal scaling? 2. The act of adding additional instances to the pool to handle scaling is called ________ scaling -You are right, both ask about horizontal scaling but it's done from a different angel in every question and in addition, I do believe repetition helps you to learn something in a way where you are not fixed on the way it's asked, rather you understand the concept itself. +You are right, both ask about horizontal scaling but it's done from a different angle in every question and in addition, I do believe repetition helps you to learn something in a way where you are not fixed on the way it's asked, rather you understand the concept itself. From 079c971f549d302464b5e45258cfc85378352aee Mon Sep 17 00:00:00 2001 From: sha016 <92833633+sha016@users.noreply.github.com> Date: Wed, 20 Oct 2021 23:16:30 -0500 Subject: [PATCH 2/2] Question answers (#165) * Added answers for 3 questions --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index ef085ff..ebdf1cd 100644 --- a/README.md +++ b/README.md @@ -3011,6 +3011,12 @@ Should be `x=2`
How to store the output of a command in a variable?
+ +``` +OUTPUT=$(ls -1) +echo "${OUTPUT}" +``` +[Source](https://stackoverflow.com/questions/4651437/how-do-i-set-a-variable-to-the-output-of-a-command-in-bash)
@@ -3512,6 +3518,13 @@ execution or run forever, you may want to run them in the background instead of
How can you find how much memory a specific process consumes?
+ +mem() +{ + ps -eo rss,pid,euser,args:100 --sort %mem | grep -v grep | grep -i $@ | awk '{printf $1/1024 "MB"; $1=""; print }' +} + +[Source](https://stackoverflow.com/questions/3853655/in-linux-how-to-tell-how-much-memory-processes-are-using)
@@ -13438,6 +13451,9 @@ In Copyleft, any derivative work must use the same licensing while in permissive
What is faster than RAM?
+ +CPU cache. +[Source](https://www.enterprisestorageforum.com/hardware/cache-memory/)