layout | permalink | title | header1 | header2 | image | home |
---|---|---|---|---|---|---|
tutorial_page |
/IDE_2024_AWSUNIX |
AWS/Unix Review for IDE 2024 |
Workshop Pages for Students |
AWS and Unix intro |
/site_images/CBW_epidemiology_icon.png |
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.
You can find the instructions 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 is the output?
Solution
$ ls
CourseData R workspace
The ls
command lists the contents of a working directory.
- Type the
pwd
command - what is the output?
Solution
$ pwd
/home/ubuntu
The pwd
command shows the absolute path to the working directorpwy.
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:
Using the commands you just learned, explore the .gff file in your home directory.
- Is the file a text file?
Solution
Yes. You can use less
, cat
, head
, or tail
and get human-readable info. Note that this doesn't have anything to do with its file extension.
- How many lines does the file have?
Solution
$ wc -l GCF_009858895.2_ASM985889v3_genomic.gff
67 GCF_009858895.2_ASM985889v3_genomic.gff
There are 67 lines in this file.
- Can you read the content of the file using less?
Solution
$ less GCF_009858895.2_ASM985889v3_genomic.gff
Using the commands you just learned, create a file called helloworld.txt and edit it using nano.
-
Write “Hello world” into the file. Save the file and exit nano.
-
Create a subdirectory called “test”; move the helloworld.txt file into test.
-
Create a copy of the helloworld.txt file called helloworld2.txt
-
First, use the
nano
command to open a file calledhelloworld.txt
Solution
$ nano helloworld.txt
Inside the nano editor, write "Hello world", then use the ^O
option to write the changes and ^X
to exit.
- Create a subdirectory called “test”; move the helloworld.txt file into test.
Solution
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
.
Solution
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 and in files.
Workshop notes and quiz questions here.
This section will show students how the basic concepts fit together and how they apply in the context of bioinformatics.
Workshop notes and quiz questions here.