Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blockkurs MicrobialBioinfo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AMR
Blockkurs MicrobialBioinfo
Merge requests
!5
Update 3 files
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update 3 files
master-patch-1968
into
master
Overview
0
Commits
1
Pipelines
0
Changes
3
Merged
Fanny Wegner
requested to merge
master-patch-1968
into
master
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
3
Expand
/README.md
/exercises/UNIX_HPC_exercise_instructions.md
/exercises/UNIX_HPC_cheat_sheet.md
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
7731bf33
1 commit,
2 years ago
3 files
+
64
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
exercises/UNIX_HPC_cheat_sheet.md
0 → 100644
+
53
−
0
Options
# 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
```
Loading