Command Lines Flashcards

1
Q

Home Directory

A

~

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

present working directory

A

pwd

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

shows the physical pathway

A

-P

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

see files in current directory

A

ls

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

see both “visible” and “hidden” files and directories.

A

-a

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

flag that will list out the names of the files and directories as well as give more detailed information about them.

A

-l

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

shows file size

A

-h

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

sorts by file size

A

-S

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

Sorting by Last Modified Time

A

-t

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

reverse sort

A

-r

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

create a link between two files

A

ln

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

If the source file already exists when linking files you will get an error, how do you fix the error and force link the files

A

-f

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

link a directory

A

-s

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

change directory

A

cd

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

Once inside of a directory, it can be useful to be able to navigate back up a directory. One way to do this would be to call cd giving it the full path to the directory you want to go. Another way to accomplish the task of moving up to the parent directory is to use the special path

A

. .

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

how to create a directory

A

mkdir directory name

17
Q

make a nested directory

A

-p

18
Q

How to copy a single file

A

To copy a single file we can call the cp command with two arguments. The first argument is the file we want to copy, the source file. The second argument, or target, is the location we want to copy the source file t

19
Q

when you copy multiple files, the last argument must be a

A

directory

20
Q

what does verbose output do and how do you enter it

A

-v; it shows you the steps taken to complete a command

21
Q

how do you copy a directory?

A

-R

22
Q

how do you force overwrite

A

-f

23
Q

how do you confirm overwrite?

A

-i

24
Q

how do you delete a file?

A

-rm

25
Q

what does mv do

A

copy and remove

26
Q

what does | mean

A

and then

27
Q

what does > show you

A

things that follow the >