Bash Commands and Quoting Cheat Sheet
Basic Bash Commands
pwd - Show current directory
ls - List files
cd <dir> - Change directory
cp src dest - Copy files/directories
mv src dest - Move/rename files/directories
rm file - Remove files
mkdir dir - Create a directory
touch file - Create an empty file
cat file - View file contents
Variable Usage
VAR=value - Set a variable
echo $VAR - Access variable
${VAR} - Safer variable access
Quoting
'...' - Single quotes (no interpretation)
"..." - Double quotes (expand variables)
\ - Escape a single character
Control Structures
if [ condition ]; then ... fi
for var in list; do ... done
while [ condition ]; do ... done
case $var in pattern) ... ;; esac
Functions
function_name() {
commands
Useful Wildcards
* - Matches any number of characters
? - Matches exactly one character
[abc] - Matches any character inside brackets