Bash Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Bash?

A

Short for Bourne Again SHell. It’s a command line interpreter

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

man ls

A

takes you to the manual for all the details on the command “ls”

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

What are the commands for:
copy a file,
remove a file

A

cp filename.txt newfile.txt,

rm filename.txt

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

cat

A

concatenates files together, or just prints to screen

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

what are the commands for:
print the directory you are in,
list the contents of the directory you are in,
list the contents of another directory

A

pwd,
ls,
ls foldername

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

ls -l foldername

A

list the long details for all the contents of the folder

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

What are the commands for:
create a directory
remove a directory

A

mkdir directoryname

rmdir directoryname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
How to look at the contents of a file:
print out the whole thing to the screen
print out part of a long file so you can step through
peek at the beginning of the file
peek at the last lines of the file
A

cat filename.txt
more filename.txt (space to move through, q to quit)
head filename.txt
tail filename.txt

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

what is tilde expansion or brace expansion?

A

Using tilde or braces in shortcuts for long or repeated commands

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

cd ~

cd ~-

A

change to home directory

change to last directory I was in (old pwd)

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