Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4. Execute chmod 300 subdir ; echo 1234 >>./subdir/data and describe what happen

ID: 3871125 • Letter: 4

Question

4.    Execute chmod 300 subdir ; echo 1234 >>./subdir/data and describe what happens, and why.

No such as file or directory

5.    Execute chmod 400 subdir ; ls subdir and describe what happens, and why. Here I want some detail as to why I get the messages that I get.

Cannot access subdir : No such as file or directory

6.    Execute chmod 500 subdir ; ls subdir and describe what happens, and why.

7.    Execute chmod 600 subdir and then go into that sub directory. Describe what happens, and why.

8.    Execute echo 1234 >>./subdir/data and describe what happens, and why.

9.    From ~/asgt2, execute following commands, then explain what happened. Then tell me how you fixed it so you could actually delete that file and directory.

rm subdir/data

10. Compare two ways of quick file creation. While in the “~/asgt2” directory:

Create file named data1 with: touch data1

Create file named data2 with: >data2

Explanation / Answer

4. chmod 300 subdir

From above command we are giving permission 300 to subdir i.e write and execute access for subdir

echo 1234 >>./subdir/data

A new file data is created in subdir with text 1234.

5. chmod 400 subdir

From above command we are giving permission 400 to subdir i.e read access for subdir

ls subdir

It will short list the subdir.

Cannot access subdir : No such as file or directory

If you got above error means you dont have sufficient permission to access the subdir or no subdir directory present.

6. chmod 500 subdir

From above command we are giving permission 500 to subdir i.e read and execute access for subdir.

So owner of the subdir can read and execute to subdir

  

ls subdir

It will short list the subdir.

7. chmod 600 subdir

From above command we are giving permission 600 to subdir i.e read and write access for subdir.

So owner of the subdir can read and wirte to subdir

To go into sub directory use below command.

cd subdir --> This will take into sub directory.

8. echo 1234 >>./subdir/data

A new file data is created in subdir with text 1234.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote