How does the Linux system rename multiple files at a time?
The editor today takes you to understand how the Linux system renames multiple files at a time. The knowledge points in the article are introduced in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem find the answer to the problem. Let's follow the editor to learn more about "what is the way to rename multiple files in the Linux system at a time".
Rename multiple files at a time in Linux system
You can do this using find:
Find-name "* poster.jpg"-exec sh-c'mv "$0" ${0% mv *} / folder.jpg "'{}'\; description
Here, for each file name that matches, execute:
Sh-c'mv "$0" ${0% folder.jpg *} / folder.jpg "'{} 'where' {}'is the file name passed to command_string as an argument:
Mv "$0" ${0% Universe *} / folder.jpg "so, finally, $0 will have a file name.
Finally, ${0% / *} / folder.jpg extends to the path of the old file name and adds / folder.jpg.
Example
Notice that I replaced mv with echo
$find-name "* poster.jpg"-exec sh-c 'echo "$0" ${0% echo *} / folder.jpg "' {}'\ . / anotherpath/my-poster.jpg. / anotherpath/folder.jpg. / path/to/file/test-poster.jpg. / path/to/file/folder.jpg. / tuxisthebest/ohyes/path/exm/bold-poster.jpg. / tuxisthebest/ohyes/path/exm/folder.jpg what is a Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-thread and multi-CPU operating system Using Linux, you can run major Unix tools, applications, and network protocols.
Thank you for your reading, the above is the whole content of "what is the way to rename multiple files in the Linux system at a time". Friends who learn to learn to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!