The Forever Bash Cheat Sheet

Reference

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@192.168.0.97:/home/pi/Desktop/path/to/files .

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"
done

Or simplified:

mkdir episode-0{1..50}

$