Commands for Linux to move all files in a folder

Asked 2 years ago, Updated 2 years ago, 45 views

When there is a folder called aaa, all the files inside it (including all the files inside the folder) are
zzz I want to move it to the folder, how should I use the command?

For example,

aaa_dir/a.png
aaa_dir/b.png
aaa_dir/bbb_dir/c.png

When you're like this

zzz_dir/a.png
zzz_dir/b.png
zzz_dir/c.png

I want to move it like this.

linux

2022-09-22 21:13

1 Answers

If you want to equate the two directory structures, you can use the cp and mv commands.

But looking at the above question, it seems that you are trying to move it by ignoring the directory structure. At the end, except for the mv command, all of them are options for the find command, so search.

You'll see the difference if you run the commands in order.


2022-09-22 21:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.