############## # Exercise 1 # ############## # The objective of this exercise is to familiarize yourself with the most # used commands (cd, ls, mkdir), move across the directory tree and see # the differences of using relative and absolute paths to refer to files. # we make sure that we start this exercice in our home directory cd # this command shows us where we are in the directory tree pwd # we create a directory mkdir pract_so/ # and another inside the previously created one mkdir pract_so/WORK # we enter in this directory cd pract_so/ # we check were we are again pwd # we copy a directory and all its contents to our present working directory cp -r /home/$USER/OSCAR_OS/SEQS/ . # we list the contents of the directory ls # we enter in the WORK directory cd WORK # check, if you want, were you are # we link a program to here, if we want to keep the name only the source file is needed as an argument ln -s /home/$USER/OSCAR_OS/clustalw2_sleep # we link a file using an absolute path creating it with a different name ln -s /home/$USER/pract_so/SEQS/LexA_all.fst LexA_all.fst_1 # we link a file using a relative path creating it with a different name ln -s ../SEQS/LexA_all.fst LexA_all.fst_2 # we list the contents of the directory in a long format where we can see were the links point to ls -l # ASK OSCAR IF THIS IS CORRECT BEFORE CONTINUE # we go to the parent directory cd .. # we go to the parent directory so now we are in our home (you don't believe me? check it!) cd .. # we change the name of the directory where we've been working mv pract_so/ PRACT_SO # we list the contents of our home directory so we can see that the name has change ls # we go to the WORK directory cd PRACT_SO/WORK/ # we list the directory so we can see what has happened to our previously created links ls -l # we change the name of the working file and we remove the not working one. # we can execute 2 independent commands in the same line using " ; " mv LexA_all.fst_2 LexA_all.fst ; rm LexA_all.fst_1 # we go to our home directory cd