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

Refer the directory structure shown in Fig 1. Accomplish the following tasks, in

ID: 3685815 • Letter: R

Question

Refer the directory structure shown in Fig 1. Accomplish the following tasks, in sequence. Create the directory structure as in Fig 1 in your home directory Rename each file in Personal with the prefix P. That is, the file accounts in Personal directory should be renamed as Paccounts Allow others from modifying the file Pairticket in Personal and Official directories by setting The address file in the Official directory contains some confidential addresses. To protect it, Remove all permissions to this file by anyone other than the owner. Move the file named address to a newly created directory in Myhomefyou may create your own directory under Myhome) from its current location. You may also rename the above mentioned file as medicalreport. Create a directory Backup under Myhome directory and move all the contents of Personal into Backup. Remove all the contents of Personal directory. You should do it from the Official directory. Now rename the Backup directory as Personal.

Explanation / Answer

1.mkdir Myhome

(creates a directory with the name Myhome)

cd Myhome

(changes the working directory to the directory Myhome)

mkdir Personal

(makes a sub directory personal in Myhome directory)

cd Myhome

(changes the working directory to the directory Myhome)

mkdir official

(makes a sub directory official in Myhome directory)

cd Personal

vi accounts.txt

(press i to insert new text .To save the file and leave vi,type ESC+:+wq)

vi address.txt

(press i to insert new text .To save the file and leave vi,type ESC+:+wq)

vi airticket.txt

(press i to insert new text .To save the file and leave vi,type ESC+:+wq)

cd official

vi accounts.txt

(press i to insert new text .To save the file and leave vi,type ESC+:+wq)

vi address.txt

(press i to insert new text .To save the file and leave vi,type ESC+:+wq)

vi airticket.txt

(press i to insert new text .To save the file and leave vi,type ESC+:+wq)

2.cd personal

mv accounts.txt Paccounts.txt

(renames the filename with Paccounts.txt)

mv address.txt Paddress.txt

(renames the filename with Paddress.txt)

mv airtickets.txt Pairtickets.txt

(renames the filename with Pairtickets.txt)

3.

cd Personal

chmod go-w Pairtickets.txt

(it write protects the file so that no other user can change it)

  

cd official

chmod go-w airtickets.txt

(it write protects the file so that no other user can change it)

(to provide back permission use chmod go+w airtickets.txt)

4. a.

cd official

chmod go-rwx file

(deny rwx permission for group and others)

b.cd Myhome

mkdir newdirectory

cd official

  mv address.txt /myhome/newdirectory

5.cd newdirectory

mv address.txt medicalreposrt.txt

6.cd Myhome

mkdir Backup

mv -v ~/Personal/* ~/Backup/

7.rm -rf Personal/*

8.cd Myhome

mv Backup Personal

  

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