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
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.
find aaa_dir (absolute or relative path) -name "*.png"
find aaa_dir -name "*.png" -printf "%f\n"
find aaa_dir -name "*.png" -printf "%f\n" -exec mv {} zzz_dir/ \;
574 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
585 PHP ssh2_scp_send fails to send files as intended
925 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
618 GDB gets version error when attempting to debug with the Presense SDK (IDE)
577 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.