layout | permalink | title | header1 | header2 | image | startDate | endDate |
---|---|---|---|---|---|---|---|
tutorial_page |
/AWS_v2_2021 |
AWS 2021 |
Workshop Pages for Students |
AWS and Unix intro |
/site_images/CBW_bigdata_icon.jpg |
2021-06-03 |
2021-06-03 |
by Jose Hector Galvez, Zhibin Lu & Rob Syme
Today's schedule can be found here.
This section will show students how to login to AWS and create an instance.
Once you have confirmed your account as per the email (subject line "You have been invited to join an AWS Educate Classroom"), you can log in here:
This section will show students the basics of the command line, with a focus on navigation.
- Connect to your AWS instance
- Type the
ls
command, what do you see?
Solution (click here)
$ ls
CourseData R cvmfs_cache workspace
The ls
command lists the contents of a working directory.
- After following the tutorial, can you answer what these commands (
cd
,pwd
) do?
Solution (click here)
The cd
command is used to change directories. Without arguments, it will move to the home directory (~
)
The pwd
command shows the absolute path to the working directory.
This section will show students how to manipulate files, including reading, editing, and renaming text files.
Here are two cheat-sheets that can be useful to have as a reference for common UNIX/Linux commands:
- What do the commands
cat
,head
, andtail
do? What do they have in common?
Solution (click here)
All three of these commands ouptut the contents of a text file to standard out:
cat
outputs the full contents of the filehead
outputs the first 10 lines of a filetail
outputs the last 10 lines of a file
- What does the command
less
do? How is it different fromcat
?
Solution (click here)
less
opens a text file for viewing. Unlike cat
, it will display it in a separate file viewer.
- How can you know the number of lines in a file?
Solution (click here)
The command wc -l
will display the number of lines in a file.
wc
(word count) displays the number of words, lines, and bytes in a file. The -l
option, limits the output to lines.
- Write "Hello world" into a file called
helloworld.txt
usingnano
. Save and then exit.
Solution (click here)
First, use the nano
command to open a file called helloworld.txt
$ nano helloworld.txt
Inside the nano editor, write "Hello world" and then use the ^O
option to write the changes and then ^X
to exit.
- Create a subdirectory called
test
. Then, move thehelloworld.txt
file into the directory.
Solution (click here)
First, use the command mkdir
to create this new directory. Then, use mv
to move helloworld.txt
into this directory.
$ mkdir test
$ mv helloworld.txt test/
- Create a copy of the
helloworld.txt
file calledhelloworld2.txt
, inside thetest
directory.
Solution (click here)
First, change the working directory using cd
, then use the cp
command to create the copy.
$ cd test
$ cp helloworld.txt helloworld2.txt
This section will show students how to search for files and in files.
Workshop notes and quiz questions here.
This section will show students how the basic concepts fit together and in the context of bioinformatics.
Workshop notes and quiz questions here.
Starting the AWS AMI after the workshop is over:
An updated AWS Machine Image (AMI) will be be prepred by Zhibin at the end of this CBW workshop: It will have the same software used in the workshop, but it will not contain any of the data. To get such an image started, you will need to set up your own AWS account with your own credit card, and then, the same as you did in this workshop, look for the CBW AMI, and start that with your own project.
Let us know on the slack channel or at [email protected] if you are experiencing any problems with this.