Terminal And Bash Flashcards

1
Q

Print Working Directory Command

A

pwd - Displays the current working directory

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

List Directory and files in current directory

A

ls
ls -lh (long form, human readable)
ls -lha (long form, human readable, include hidden files)

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

Change Directory

A

cd
cd ~ (home directory)
cd / (root directory)

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

Make directroy

A

mkdir

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

Remove directory

A

rmdir

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

Remove a file

A

rm
rm -r (removes directory and all it’s subdirectories and files with the -r recursive option)

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

Create an empty file

A

touch

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

Clear the page

A

clear

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

What is an Absolute path

A

Indicates the location of a file regardless of your current location in the file system

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

What is a Relative path

A

Path that starts at your current location and doesn’t require you to work backwards

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

Copy command

A

cp

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

Command to view a file one page at a time. Space bar to move to next page

A

more

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

View a file one page at a time,
Forward, Backward, Horizontal scrolling and one line at a time

A

less

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

Display top 10 lines of a file

A

head
head - (number of lines option)

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

Display bottom 10 lines of a file

A

tail
tail -Number of line (option)

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

Concatenate files

A

cat
cat > (copies output to a file)
cat&raquo_space; (appends the output to a file)

17
Q

Define: Data stream

A

Channels of data as they are processed and moved through a system

Data streams are used to move data from one process or program to another