bash_flashcards
Command/Concept
Description/Usage
cd
Changes the current directory
ls
Lists directory contents
grep
Searches text using patterns
cat
Concatenates and displays file contents
echo
Displays a line of text
chmod
Changes file permissions
pwd
Prints the current working directory
> ,»_space;
Redirects output to a file (overwrite or append)
|
Pipe: takes output from one command and passes it to another command
&&, ||
Logical AND and OR for chaining commands
if [ condition ]
Conditional execution based on a true/false condition
for VAR in LIST
Loops through a list of values
while [ condition ]
Loops as long as the condition is true
break
Exits a loop
function_name () { commands; }
Defines a function in Bash
alias name=’command’
Creates a shortcut for a command
unset
Removes a variable or function