0% found this document useful (0 votes)
70 views

ModuleLinux Session1 PracMEMO-1

1. The document provides instructions for tasks to familiarize users with basic Linux terminal commands like pwd, ls, mkdir, rmdir, and cd. 2. It asks users to create a file structure with directories like Coursera, IBT2016, Linux, and Genomics using these commands, then perform actions like listing, removing, and creating subdirectories within the structure. 3. Detailed responses explaining the commands used to complete each task are provided, with notes on using absolute vs relative paths and ensuring filenames are correctly cased under Linux.

Uploaded by

Papillon Blanc
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

ModuleLinux Session1 PracMEMO-1

1. The document provides instructions for tasks to familiarize users with basic Linux terminal commands like pwd, ls, mkdir, rmdir, and cd. 2. It asks users to create a file structure with directories like Coursera, IBT2016, Linux, and Genomics using these commands, then perform actions like listing, removing, and creating subdirectories within the structure. 3. Detailed responses explaining the commands used to complete each task are provided, with notes on using absolute vs relative paths and ensuring filenames are correctly cased under Linux.

Uploaded by

Papillon Blanc
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Introduction to Bioinformatics online course: IBT

Practical Assignment MEMORANDUM


Module topic: Linux
Contact session title: Session 1: Introduction to Linux
Trainer: Amel Ghouila

Get familiar with the terminal and the basic commands


Introduction

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.

Tools used in this session

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

Filenames under Linux

● 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: Get Started!

Task 1: instructions

1. Open a terminal in your computer.


2. What directory are you located in when you open the terminal?
Introduction to Bioinformatics online course: IBT

3. Which command could you use to check that?


4. What does this command return?
5. How can you find out what options can be used with the command? What options
are available to use with this command and what do they do?

Task 1: memo answer


1. Open the default terminal installed in your machine or the Cygwin one.
2. In my home directory
3. pwd
4. The absolute path of my home directory /home/Username
5. man pwd allows you to check the possible options and arguments for the pwd
command. The only option possible is -h to display the help. pwd doesn't require
arguments.

Task 2: Create your own files structure


Task 2: 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

5. Remove the directory FirstCourse


6. Move to the directory Genomics using one single command line.
7. List the content of the directory and display the modification date, the owner name,
etc.
8. Remove the directory Fastafiles
9. Create a directory "Session3" under Linux without moving to the Linux directory.
10. Type a single command without specifying any path to move to your home
directory.

Task 2: memo answer

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:

cd ./IBT2016/Linux or use the absolute path cd /home/Username/IBT2016/Linux


Create then Session1 and Session2 with the command
mkdir Session1 Session2

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

11. Move to the directory Coursera


Answer:
cd /home/Username/Coursera (absolute path)
or cd ../../Coursera (if you are under Genomics)

12. Create a sub-directory "FirstCourse" inside Coursera


Answer:
mkdir FirstCourse

13. Type the command cd firstcourse. What happened? Why?


Answer:
An error message appears: firstcourse is different from FirstCourse (Linux is case sensitive)

14. Remove the directory FirstCourse


Answer:
rmdir FirstCourse

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

17. Remove the directory Fastafiles


Answer:
rmdir Fastafiles

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.

You have 2 possibilities


cd
or
cd ~

You might also like