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

In LINUX Write the commands required for the following tasks. Try out each comma

ID: 3667991 • Letter: I

Question

In LINUX

Write the commands required for the following tasks. Try out each command on your system to ensure that it is correct:

Make a hierarchical directory structure under /root that consists of one directory containing three subdirectories.

Copy two files into each of the subdirectories.

Create one more directory with three subdirectories beneath it and move files from the subdirectories containing them to the counterparts you just created.

Hard-link three of the files. Examine their inodes.

Symbolically link two of the files and examine their link count and inode information.

Make symbolic links from your home directory to two directories in this structure and examine the results.

Delete the symbolic links in your home directory and the directory structure you created under /root.

Explanation / Answer

1) creating directory and sub directories

Here -p is for parent directory option.

------------------------------------------------------------------------------------------------------------------------------------------

2) with normal cp command we cannot copy multiple files to directories. But using xargs we cana chieve this.

---------------------------------------------------------------------------------------------------------------------------------------------

3) first we creare directory with three subdirectories

Here -p is for parent directory option.

--------------------------------------------------------------------------------------------------------------------------------------

4) using mv command to copy all files in dir1 diretory to another dir2

-------------------------------------------------------------------------------------------------------------------------------------------------

5) using ln command we can make hardlinks among files

--------------------------------------------------------------------------------------------------------------------------------------------------------

6) first link files first

then print inodes onformation and count using this command

---------------------------------------------------------------------------------------------------------------------------------------------------------

7) we can create symbolic link using ln -s command

and examine results

l -L

-------------------------------------------------------------------------------------------------------------------------------------

8) using rm command we can remove symbolic links.

$ rm -f dir2

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