[MacPorts] #70186: `rename` doesn't preserve original file name parts

MacPorts noreply at macports.org
Fri Jun 7 17:16:48 UTC 2024


#70186: `rename` doesn't preserve original file name parts
---------------------+------------------------
 Reporter:  Bachsau  |      Owner:  (none)
     Type:  defect   |     Status:  new
 Priority:  High     |  Milestone:
Component:  ports    |    Version:  2.9.3
 Keywords:           |       Port:  util-linux
---------------------+------------------------
 I've been running the following command and instead of replacing the file
 extension, it wants to rename every file to the exact string specified as
 the replacement:

 {{{
 find . -type f -iname '*.pdf' -exec rename -v -n pdf pdf_ {} +
 }}}

 Running the same command in the same directory from a linux machine works
 as expected.

 For example, it does this:

 {{{
 './2020/2020-01.pdf' -> `pdf_'
 }}}

 instead of this:

 {{{
 './2020/2020-01.pdf' -> `./2020/2020-01.pdf_'
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/70186>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list