- Login to O2 and start an interactive session.
- Change directories into
unix-intro
. - List the contents of the
other
directory. How many files are in the folder? - Make a copy of the
sequences.fa
file and put it in theother
folder. Name this filesequences-copy.fa
.
- Change directories into
other
. List all theMov10
FASTQ files inraw_fastq
from your current directory without changing directories. - Do each of the following using a single
ls
command without navigating to a different directory. HINT: You will want to use a wildcard here.- List all of the files in /bin that start with the letter 'c'
- List all of the files in /bin that contain the letter 'a'
- List all of the files in /bin that end with the letter 'o'
- BONUS: List all of the files in /bin that contain the letter 'a' or 'c'. (This was not covered in the lesson)
- Print the contents of
sequences-copy.fq
to the screen. - Use the
head
command to keep only the frst two sequences of this file.
NOTE: Before you tackle these questions, it will be helpful to look over the Advanced Shell topics
- The last two lines of the file
sequences-copy.fq
represent a protein sequence. Use thetail
command to take those two lines and redirect them into a new file calledprotein.fa
. - Use
grep
to search for the pattermCAGCT
in thesequences-copy.fq
file. Use your shell knowledge to count how many times that pattern appears in the file. Now use theman
pages to find out how you can count using thegrep
command.