Bash Commands Flashcards

1
Q

ls

A

lists the directory contents, common flags are -a, -l

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

echo

A

prints text to the terminal window. Used in scripts and batch files, shows the value of environmental variables. Common flags; -e, -n

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

touch

A

creates files in the current directory. Common flags; -a, -m, -r, -d

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

mkdir

A

Makes a directory in the current directory.

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

grep

A

“Global Regular Expression” searches for text patterns specified by the user. Common options; -i, -c, -n, -r, -v

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

man

A

print manual or get help for a command.

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

pwd

A

“Print Working Directory”

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

cd

A

“change directory”
.. to go up one directory
use a name to go into
or an absolute path

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

mv

A

Move/Rename a directory

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

rmdir

A

removes empty directories

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

rm

A

removes directories/files

rm -r //force remove file/directory

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

locate

A

finds a file or directory

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

less

A

allows user to view the contents of a file in the terminal

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

compgen

A

shows all available commands, aliases, and functions.

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

cat

A

a command for reading files, creating files, and concatenating files.

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

|

A

operator to take the standard input of one command and pass it as the input for another.

17
Q

head

A

read the first few lines of a file

18
Q

tail

A

read the end of a file

19
Q

chmod

A

sets the permissions flag on a file or folder

20
Q

exit

A

ends the execution of a shell script, close a terminal window

21
Q

more

A

loads the entire file into the terminal for reading

22
Q

curl

A

downloads or uploads data using protocols such as FTP, SFTP, HTTP, and HTTPS