Skip to content
Snippets Groups Projects
Commit 7731bf33 authored by Fanny Wegner's avatar Fanny Wegner
Browse files

Update 3 files

- /README.md
- /exercises/UNIX_HPC_exercise_instructions.md
- /exercises/UNIX_HPC_cheat_sheet.md
parent 2df6a704
No related branches found
No related tags found
1 merge request!5Update 3 files
# Blockkurs MicrobialBioinfo
# Blockkurs Microbial Bioinformatics
Welcome to the home page of the Microbial Bioinformatics course.
### Course material
## Course material
## Introduction to UNIX and HPC
- [ ] [Introduction to UNIX slides](slides/introduction_UNIX_HPC.pdf)
- [ ] [Exercise instructions](exercises/UNIX_HPC_exercise_instructions.md)
- [ ] [Cheat sheet](exercises/UNIX_HPC_cheat_sheet.md)
......
# Bash Cheat Sheet
A cheat sheet for bash commands.
## Manage and navigate directories
```bash
pwd # Print current directory path
ls # List directories
ls -a|--all # List directories including hidden
ls -l # List directories in long form
ls -l -h|--human-readable # List directories in long form with human readable sizes
cd foo # Go to foo sub-directory
cd # Go to home directory
cd ~ # Go to home directory
cd - # Go to last directory
mkdir foo # Create foo directory
rmdir foo # Delete foo directory
rmdir -r foo # Delete foo directory including content
```
## Manage files
```bash
cp foo.txt bar.txt # Copy file
mv foo.txt bar.txt # Move/Rename file
rm foo.txt # Delete foo.txt
rm * # Delete all files in current directory
```
## Read and manipulate files
```bash
cat foo.txt # Print all contents
less foo.txt # Print some contents at a time (g - go to top of file, SHIFT+g, go to bottom of file, /foo to search for 'foo')
head foo.txt # Print top 10 lines of file
tail foo.txt # Print bottom 10 lines of file
nano foo.txt # Simple file editor
vi foo.txt # Advanced file editor
wc foo.txt # List number of lines words and characters in the file
```
## Input and Output
```bash
echo "Hello world!" # Print statement to standard output
echo "foo" > bar.txt # Direct output into file. Overwrites file if it already exists.
echo "foo" >> bar.txt # Direct output into file and append if it already exists.
command 1 | command2 # Directs output from command1 as standard input into command2
```
## Before you start
If you have questions about any command, you can always type `man [command]` to get an explanation and all possible additional options.
## Exercise 1 - Navigating the filesystem on command line
**Objective:** get familiar with navigating the directory tree and listing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment