bash_flashcards

1
Q

Command/Concept

A

Description/Usage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cd

A

Changes the current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ls

A

Lists directory contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

grep

A

Searches text using patterns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

cat

A

Concatenates and displays file contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

echo

A

Displays a line of text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

chmod

A

Changes file permissions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

pwd

A

Prints the current working directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

> ,&raquo_space;

A

Redirects output to a file (overwrite or append)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

|

A

Pipe: takes output from one command and passes it to another command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

&&, ||

A

Logical AND and OR for chaining commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

if [ condition ]

A

Conditional execution based on a true/false condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

for VAR in LIST

A

Loops through a list of values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

while [ condition ]

A

Loops as long as the condition is true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

break

A

Exits a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

function_name () { commands; }

A

Defines a function in Bash

17
Q

alias name=’command’

A

Creates a shortcut for a command

18
Q

unset

A

Removes a variable or function