Can you please help with these Linux question about directory Questions: 1 - Ans
ID: 3878851 • Letter: C
Question
Can you please help with these Linux question about directory
Questions:
1 - Answer the following questions about the directory size:
a) What is the size (in MB) of the /etc directory?
b) Which directory is bigger: /etc, /bin or /sbin)?
2 - What is the purpose of the watch command?
3 - Answer the following questions about memory:
a) What is the total amount of memory (RAM) installed in the Course Server?
b) What is the amount of used memory?
c) What is the amount of free memory?
d) What is the amount of shared memory?
e) What is the amount of available memory?
4 - What does the symbol > do in the command dir > myFile?
5 - What does the symbol >> do in the command dir >> myFile?
6 - What does the symbol | do in the command dir | find myFile?
Thanks
Explanation / Answer
1)
a)What is the size (in MB) of the /etc directory?
The size of /etc directory is = 34 MB
To check size uyse the command: du -sh /etc
b) /etc is bigger than /bin and /sbin
/etc is 34mb
/bin is 7.8 mb
/sbin is 15 mb
2) Watch command:In linux watch is mainly used to run any command at regular intervals. It displays its output on a console.
syntac: watch [option] command
3) Total ram used depends on server installed. Hete i'm giving details about my server.
Total memory = 4103MB = 4gb
used = 555MB
free = 3548MB
Sared = 0 mb
4) > is used to write the file mifile.
5) >> is used to append the file mifile.
6) | is a pipe command. Pipe command used to join two coomand.