ModuleLinux Session1 PracMEMO-1
ModuleLinux Session1 PracMEMO-1
The aim of this first assessment is to get familiar with the basic terminal commands that
we've already gone over.
The best way to learn Linux and get more comfortable with it is to practice and force
yourself to start using it.
If you do have a Linux system installed in your machine, make use of your system terminal. If
you are a windows user, we highly recommend the use of the Cygwgin tool
(https://cygwin.com/index.html). You can find more information about the Cygwgin
installation via this link: https://cygwin.com/install.html
● Make sure you separate your command name, arguments and options using spaces
● Each option is preceded by - (examples: -l, -r, -lh)
● Linux is case-sensitive: A and a are different (Cygwin and Mac terminals are not)
Please note
● Hand-in information If you are formally enrolled in the IBT course, please upload
your completed practical assignment to the Vula ‘Practical Assignments’ tab. Take
note of the final hand-in date for each practical assignment, which will be indicated
on Vula.
Task 1: instructions
Provide the command lines used to carry out each of the tasks below
1. Create the above file structure under your home directory using the terminal.
2. Move to the directory Coursera.
3. Create a sub-directory "FirstCourse" inside Coursera.
4. Type the command cd firstcourse. What happened? Please explain?
Introduction to Bioinformatics online course: IBT
There are different combinations of command lines that will allow you to do so. You can
either specify full paths or relative paths: You should be first locate in your home directory
under /home/Username. Create the first directories that are immediately under your home
directory.
mkdir Coursera MasterCourses IBT2016
or
mkdir Coursera
mkdir MasterCourses
mkdir IBT2016
To create the directories under IBT2016, you can move to IBT2016 and create directories or
create them specifying absolute or relative paths.
cd IBT2016
mkdir Linux Genomics
or from where your are standing (your home directory now)
Using absolute paths
mkdir /home/Username/IBT2016/Linux
mkdir /home/Username/IBT2016/Genomics
Using relative paths
mkdir ./IBT2016/Linux
mkdir ./IBT2016/Genomics
To create the directories under Linux, you can move to Linux and create directories or create
them specifying absolute or relative paths. To create, the remaining sub-directories, we will
move to the directory and then create the sub-directory.
Check what is your current working directory. From there; move to Linux.
If you are in your home directory, you can do the following:
To create the directories under Genomics, we will move to Genomics and create VCFfiles
and Fastafiles. You should be currently in the Linux directory
Introduction to Bioinformatics online course: IBT
cd ../Genomics/ or cd /home/Username//IBT2016/Genomics
mkdir VCFfiles Fastafiles
P.S: - If you choose to create the different sub-directories with a single command line, make
sure your separate the different directories names by space.
- Make sure that your absolute and relative paths do not contain spaces
15. Move to the directory Genomics using one single command line.
Answer:
Coursera is our current working directory; you can check that using pwd
There are 2 options:
cd /home/Username/IBT2016/Genomics (absolute path)
or
cd ../IBT2016/Genomics (relative path)
16. List the content of the directory and display the modification date, the owner name,
etc.
Answer:
ls -l or ls -lh
18. Create a directory "Session3" under Linux without moving to the Linux directory.
Answer:
Your current working is Genomics; you can check that using pwd
You have 2 possibilities
mkdir /home/Username/IBT2016/Linux/Session3 (absolute path)
Introduction to Bioinformatics online course: IBT
or
mkdir ../ Linux/Session3 (relative path)
19. Type a single command without specifying any path to move to your home
directory.