Practice 2

1.Create a directory called /root/velocity-lab

  1. inside velocity-lab directory create two more directory practice1 and practice2

3.inside practice1 directory create a file write the text below and save it with name fruits

orange

apple

pineapple

guava

pear

grape

watermelon

grapefruit

walnut

banana

mango

peanut

berry

cherry

blackberry

strawberry

badam

aanp

suntala

peach

coconut

nariwol

angur

belauti

amba

bhuinkathar

guacakomoli

avacado

  1. copy fruits to fruits.txt
  2. move fruits.txt to practice2 directory
  3. read fruits file
  4. read fruits file so that you can scroll up and down
  5. copy fruits.txt to practice1 directory with name delete.txt
  6. remove delete.txt file

10.create a file called a in practice1 and wtire

this is a first line

  1. create a file called b in practice2 and write

this is a second line

  1. go to practice1 folder and add the contents of file a and file b to a file called ab
  2. go to a directory /var/log and create a file yourname.txt and cd /root/velocity-lab
  3. search for file yourname.txt using locate and find command
  4. show top 7 lines of fruits file that /root/velocity-lab/practice1 directory
  5. show bottom lines of fruits file that /root/velocity-lab/practice1 directory
  6. put the content ab file and top 5 line of fruits file to a file called abfruits
  7. go to /root/velocity-lab, create a directory test1/test2/test3 inside velocity-lab directory
  8. copy ab fruits fruits.txt a b to test3 directory
  9. copy contents of test3 directory to test1 directory
  10. delete a directory test2
  11. list the command you have been typing and send it to the file history.txt
  12. change a directory to /root/velocity-lab make a tar archive with tar command for test1 directory with name test1.tar.gz in current working directory
  13. list the contents of test1.tar.gz
  14. extract test1.tar.gz in /tmp directory and verify if the test1 directory is creted in /tmp

 

Leave a Reply