Directories Flashcards

1
Q

Create a parent directory ‘head’ and a subdirectory ‘eyes’ at the same time

A

mkdir -p head/eyes

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

Use mv to extract a file Monday for week directory and put it to dir1

A

mv /root/week/Monday dir1/

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

using just one mv command take file clouds from stars directory and put it to night directory and rename this clouds file to milkyway

A

mv stars/clouds night/milkyway

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

when you rename the directory does it loose files inside?

A

no, renming doesn’t affect the files

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

which command is better to use to rename group of the files? syntax?

A

rename .mp3 .png *

touch hey, rename all mp3 files to png

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