Linux Basics and Tasks

Basics

To view a file in Linux:

To list contents in a directory:

Task 1

Create the following table in a file named test_table1.txt

1   2   3   4   5
6   7   8   9   10
11  12  13  14
15  16  17  18

Create a directory

Create a directory named genomics_workshop_PoODL and move test_table1.txt into it.

Count lines

Count the number of lines in test_table1.txt.

Count columns

Count the number of columns per row in test_table1.txt.

Count occurrences of "1"

Count how many times 1 appears in test_table1.txt.

Count words containing "1"

Count the number of words/strings containing 1 in test_table1.txt.

Delete file

Delete test_table1.txt.