From cc151926a8425fa6e505037d6052e650d8da056c Mon Sep 17 00:00:00 2001 From: abregman Date: Fri, 18 Oct 2019 17:23:35 +0300 Subject: [PATCH] Add a couple of Linux questions --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a033129..0422c2e 100644 --- a/README.md +++ b/README.md @@ -511,6 +511,17 @@ The tasks are stored in a cron file. What is the difference between Linux and Unix?
+
+Are you familiar with the following process monitoring tools and commands?: + + * top + * ps + * htop + * atop + * lsof +Can you explain when are you using each one?
+
+
What is a Linux kernel module and how do you load a new module?
@@ -597,19 +608,35 @@ To view all available signals run `kill -l`
-In what state a process in Linux can be?
+What are daemons?
+
+ +
+What are the possible states of a process in Linux?
-Ready Running -Blocked +Waiting +Stopped Terminated Zombie
-Find all files which end with '.yml' and replace the number 1 in 2 in each file
+What is the init process?
+
-find /some_dir -iname \*.yml -exec sed -i "s/1/2/g" {} \; +
+How to change the priority of a process? Why would you want to do that?
+
+ +
+What are system calls? What system calls are you familiar with?
+
+ +
+Find all the files which end with '.yml' and replace the number 1 in 2 in each file
+ +ind /some_dir -iname \*.yml -print0 | xargs -0 -r sed -i "s/1/2/g"
@@ -645,7 +672,7 @@ related to the file like its size, owner, permissions, etc.
-How to list ports which being currently used?
+How to list active connections?
@@ -670,9 +697,11 @@ While an A record points a domain name to an IP address, a PTR record does the o #### :star: Advanced
-How to delete the last word from each line in a file?
+What happens in the OS when you execute ls?
+
-sed "s/\s*\w\+\s*$//" file +
+How processes are being created?
@@ -701,6 +730,18 @@ There are a couple of ways to do that: * fallocate -l 2097152 new_file.txt
+
+What are the differences between the following system calls?: exec(), fork(), vfork() and clone()?
+
+ +
+Explain Process Descriptor and Task Structure
+
+ +
+Explain Kernel Threads
+
+ ## Ansible @@ -1373,6 +1414,10 @@ Depends on the language and settings used but in Bash for example, by default th Explain continue and break. When do you use them if at all?
+
+How to store the output of a command in a variable?
+
+
How do you check variable length?