The Forever Bash Cheat Sheet


For reference here are the bash commands I always have to look up.

Table Of Contents

Edit Bash Settings

# Nano Editor
$ nano ~/.bashrc
$ nano ~/.bash_profile

# VS Code
$ code ~/.bashrc
$ code ~/.bash_profile

Secure Copy From Raspberry Pi to Present Directory

$ cd /path/files/should/end/up
$ scp -rp pi@ .

Check Disk Space

$ df -H

Check Size of Current Directory

$ du -sh .

See All Running Processes

$ top

# Or install the more robust htop
$ brew install htop
$ htop

Ctrl + C to exit

Create Multiple Numbered Directories At Once

for i in {1..8}; do
mkdir episode-0"$i"

Or simplified:

mkdir episode-0{1..50}