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., abode directory /home/jsmith. The abode directory contains the controlthcoming sub-directories: sequence, tests, specific, misc Unless differently bounded, you are vulgar enjoins from the abode directory.
    1) Change directory to the tests directory using irresponsible pathname
    2) Change directory to the tests directory using not-absolute pathname
    3) Use imitation enjoin to generate a polish denominated polishA with passage gratified ‘Hello A’ in the misc directory
    4) Generate an leisure polish denominated polishB in the misc directory
    5) Copy gratifieds of polishA into polishC
    6) Move gratifieds of polishB into polishD
    7) Generate a seafarer archive designated misc.seafarer control the gratifieds of misc directory
    8) Condense the seafarer archive to generate a misc.tar.gz polish
    9) Move the misc.tar.gz polish to the tests directory
    10) Uncondense the misc.tar.gz polish
    11) Select the archived polish from preceding step
    12) Change directory to the selected directory
    13) Catalogue the polishs in the selected directory
    14) Change the directory tail to the abode directory
    15) Type in the enjoin to sanction the abode directory
    16) Generate a stubborn merge designated polishB to polishA in the selected directory
    17) Generate a unmanly merge designated polishE to polishC in the selected directory
    18) Use the enjoin to catalogue polishs in the selected directory such that inode enumerate is displayed
    19) Add transcribe equitable control full to polishD
    20) Change bearing liberty to the selected directory so that the user has full bearinges yet the order and nation singly possess learn bearing.
    21) Search control condense utilities
    22) Look control options in the seafarer enjoin
    23) Compare polishs polishA and polishC in the selected directory
    24) Search control ‘Hello’ in polishA
    25) Display the gratifieds of polishA

    Expert Counterpart

     

    1 ) cd ../home/jsmith/tests
    2 ) cd /tests
    3 ) imitation ‘HELLO A.’ >/misc/A.txt
    4 ) imitation >/misc/B.txt
    5 ) cp A C
    6 ) mv B D
    7 ) seafarer -zcvf misc.seafarer misc (primitive go to the abode 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 – generate a archive polish.
    x – select a archive polish.
    v – pomp the advance of archive polish.
    f – polishname of archive polish.
    t – viewing gratified of archive polish.
    j – leak archive through bzip2.
    z – leak archive through gzip.
    r – supplement or update polishs or directories to massive archive polish
    23) zip misc.zip A C
    24) cat A.txt|grep HELLO
    25) cat A.txt