-
Notifications
You must be signed in to change notification settings - Fork 0
1. Directory_exercises
- Open Terminal

- Find the path of current working directory -> type pwd
- List the contents of the directory -> type ls

-
Travel to the path of 00_DATA -> cd /path_to/../../00_DATA
-
List the contents of the directory -> type ls
-
type ls -altr -> record your observation
-
Find the details of parameters -a,l,t,r (man ls, to quit type q at :)
-
type ls -altrh -> record your observation
-
type mkdir 1_Dir -> Make Directory
-
Enter inside 1_Dir -> cd ./1_Dir
-
Exit 1_Dir -> cd ../1_Dir
-
Clear the clutter in screen -> type clear
-
Copy genome fasta file into 1_Dir -> cp GCF_000005845.2_ASM584v2_genomic.fna ./1_Dir
-
List the content of 1_Dir
-
Enter inside 1_Dir -> cd ./1_Dir
-
Rename the file name to a neat version -> mv GCF_000005845.2_ASM584v2_genomic.fna E.coli_genome.fa
Similarly copy and move GCF_000005845.2_ASM584v2_protein.faa to E.coli_proteome.fa
-
Make one more directory named “Dir_2” inside this directory
-
Exit to 00_DATA directory -> cd ../../
-
Rename the directory 1_Dir to Dir_1 -> mv 1_Dir Dir_1
-
List the content of Dir_1
-
Remove Dir_1 -> rm -rf ./Dir_1/Dir_2; If you are inside Dir_1, then rm -rf Dir_2
Summary:
You opened a terminal -> checked the path -> listed its contents -> made a directory -> copied a file into new directory -> renamed the file -> renamed a directory -> created a subdirectory -> removed the subdirectory
pwd – Present working directory
ls – list
cd – Change Directory
mkdir – make directory
rm – remove
mv – move
cp – copy
clear – clear the screen
Now, check your learning with self-graded quiz !
Once complete, move to next section 2. File operations