Homework Solution: Your login name: jsmith i.e., home directory /home/jsmith. The home directory contains the following sub-director…

    Your login name: jsmith i.e., home directory /home/jsmith. The home directory contains the following sub-directories: code, tests, personal, misc Unless otherwise specified, you are running commands from the home directory. 1) Change directory to the tests directory using absolute pathname 2) Change directory to the tests directory using relative pathname 3) Use echo command to create a file named fileA with text content ‘Hello A’ in the misc directory 4) Create an empty file named fileB in the misc directory 5) Copy contents of fileA into fileC 6) Move contents of fileB into fileD 7) Create a tar archive called misc.tar for the contents of misc directory 8) Compress the tar archive to create a misc.tar.gz file 9) Move the misc.tar.gz file to the tests directory 10) Uncompress the misc.tar.gz file 11) Extract the archived file from previous step 12) Change directory to the extracted directory 13) List the files in the extracted directory 14) Change the directory back to the home directory 15) Type in the command to confirm the home directory 16) Create a hard link called fileB to fileA in the extracted directory 17) Create a soft link called fileE to fileC in the extracted directory 18) Use the command to list files in the extracted directory such that inode number is displayed 19) Add write right for all to fileD 20) Change access permission to the extracted directory so that the user has all accesses but the group and people only have read access. 21) Search for compress utilities 22) Look for options in the tar command 23) Compare files fileA and fileC in the extracted directory 24) Search for ‘Hello’ in fileA 25) Display the contents of fileA

    Expert Answer

     
    1 ) cd ../home/jsmith/tests 2 ) cd /tests

    Your login name: jsmith i.e., residence directory /home/jsmith. The residence directory contains the aftercited sub-directories: mode, tests, singular, misc Unless inadequately limited, you are ordinary enjoins from the residence directory.
    1) Change directory to the tests directory using arbitrary pathname
    2) Change directory to the tests directory using not-absolute pathname
    3) Use retort enjoin to restraintm a finish designated finishA with collect resignededed ‘Hello A’ in the misc directory
    4) Restraintm an space finish designated finishB in the misc directory
    5) Copy resignededs of finishA into finishC
    6) Move resignededs of finishB into finishD
    7) Restraintm a seafarer archive determined misc.seafarer restraint the resignededs of misc directory
    8) Epitomize the seafarer archive to restraintm a misc.tar.gz finish
    9) Move the misc.tar.gz finish to the tests directory
    10) Unepitomize the misc.tar.gz finish
    11) Collect the archived finish from anterior step
    12) Change directory to the collected directory
    13) Schedule the finishs in the collected directory
    14) Change the directory end to the residence directory
    15) Type in the enjoin to corroborate the residence directory
    16) Restraintm a callous attach determined finishB to finishA in the collected directory
    17) Restraintm a undecided attach determined finishE to finishC in the collected directory
    18) Use the enjoin to schedule finishs in the collected directory such that inode sum is displayed
    19) Add transcribe correct restraint every to finishD
    20) Change approximation dispensation to the collected directory so that the user has every approximationes excluding the class and fellow-creatures solely keep peruse approximation.
    21) Search restraint epitomize utilities
    22) Look restraint options in the seafarer enjoin
    23) Compare finishs finishA and finishC in the collected directory
    24) Search restraint ‘Hello’ in finishA
    25) Display the resignededs of finishA

    Expert Retort

     

    1 ) cd ../home/jsmith/tests
    2 ) cd /tests
    3 ) retort ‘HELLO A.’ >/misc/A.txt
    4 ) retort >/misc/B.txt
    5 ) cp A C
    6 ) mv B D
    7 ) seafarer -zcvf misc.seafarer misc (highest go to the residence directory)
    8 ) gzip misc.tar
    9 ) mv misc.tar.gz /home/jsmith/tests
    10) gunzip misc.tar.tz
    11) seafarer -xvf misc.tar
    12) cd misc
    13) ls /misc
    14) cd $home/jsmith
    15) pwd
    16) ln $home/misc/B $home/misc/A
    17) ln -s E C
    18) ls -id /misc
    19) chmod 777 D
    20) cdmod u=rwx misc
    22) c – restraintm a archive finish.
    x – collect a archive finish.
    v – pretence the proceeding of archive finish.
    f – finishname of archive finish.
    t – viewing resignededed of archive finish.
    j – defecate archive through bzip2.
    z – defecate archive through gzip.
    r – affix or update finishs or directories to bulky archive finish
    23) zip misc.zip A C
    24) cat A.txt|grep HELLO
    25) cat A.txt