Skip to content

Overview

Learning Objectives

By the end of this week, students will be able to:

  1. Use the grep command to search for specific characters or patterns in a text file.
  2. Redirect command output to a file using output redirection (> and >>) to write or append content.
  3. Apply the pipe (|) operator to create pipelines, connecting the output of one command as the input to another.
  4. Utilize the wc command to count lines, words, and characters in an input.
  5. Employ the sort command to organize input data in a specified order.
  6. Differentiate between > (overwrites content) and >> (appends content) for file redirection.
  7. Construct pipelines (first | second) to efficiently combine multiple commands in sequence.

Ongoing List of Commands

cp [old] [new] copies a file

mkdir [directory-name] creates a new directory

ls lists all the files and directories in a specific location 

mv [old] [new] moves(renames) a file or directory 

rm removes(deletes) a file

`*` matches zero or more characters in a filename, so *.txt matches ALL files ending in .txt 

`?` matches a single character in a filename, so ?.txt matches a.txt or b.txt but not ab.txt 
+ Use of the <button>control</button> key may be described in many ways, including Ctrl-X, Control-X, or ^X. 

+ The shell does not have a trash bin, once something is deleted it is really gone. 

+ Most file names are `something.extension`. The extension is not required, but does help bioinformatic programs find required files (ex. FASTQC)

+ Depending on the type of work you do, you may need a more powerful text editor than Nano.