Skip to content

Lesson 3

Lesson 3 practice

For these practice questions, check the present working directory and if needed, change into the /data/username folder (username is the student account ID).

What command is used to check present working directory?

Solution

pwd

If not in the /data/username folder, then what is the approach to change into it?

Solution

cd /data/username

Copy the lesson3_practice folder from /data/classes/BTEP/unix_on_biowulf_2023_practice_sessions to the present working directory, which should be /data/username.

Solution

cp -r /data/classes/BTEP/unix_on_biowulf_2023_practice_sessions/lesson3_practice .

Change into the lesson3_practice folder.

Solution

cd lesson3_practice

How many files and directories are in the lesson3_practice folder?

Solution

ls -l

There is one folder and one file.

drwxr-x--- 2 wuz8 wuz8 4096 May 11 17:29 sample_sequence_data
-rw-r----- 1 wuz8 wuz8   46 May 11 17:29 text1.txt

Change into the sample_sequence_data folder. How many files are there?

Solution

cd sample_sequence_data
ls -l

There are 12 fq or fastq files.

-rwx------ 1 wuz8 wuz8 29108029 May 11 17:18 HBR_1_R1.fq
-rwx------ 1 wuz8 wuz8 29108029 May 11 17:19 HBR_1_R2.fq
-rwx------ 1 wuz8 wuz8 35553295 May 11 17:18 HBR_2_R1.fq
-rwx------ 1 wuz8 wuz8 35553295 May 11 17:18 HBR_2_R2.fq
-rwx------ 1 wuz8 wuz8 31861169 May 11 17:18 HBR_3_R1.fq
-rwx------ 1 wuz8 wuz8 31861169 May 11 17:19 HBR_3_R2.fq
-rwx------ 1 wuz8 wuz8 55822508 May 11 17:19 UHR_1_R1.fq
-rwx------ 1 wuz8 wuz8 55822508 May 11 17:18 UHR_1_R2.fq
-rwx------ 1 wuz8 wuz8 39860900 May 11 17:18 UHR_2_R1.fq
-rwx------ 1 wuz8 wuz8 39860900 May 11 17:18 UHR_2_R2.fq
-rwx------ 1 wuz8 wuz8 45524396 May 11 17:19 UHR_3_R1.fq
-rwx------ 1 wuz8 wuz8 45524396 May 11 17:18 UHR_3_R2.fq

How many sequencing reads are in HBR_1_R1.fq?

Solutions

grep @HWI HBR_1_R1.fq | wc -l

There are 118571 sequencing reads.

Go back up one directory to the lesson3_practice folder.

Solutions

cd ..

Rename text1.txt to text_file1.txt.

Solutions

mv text1.txt text_file1.txt