]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'feat/3887/rename' of https://github.com/echoechoin/util-linux
authorKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2026 08:07:20 +0000 (10:07 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2026 08:07:20 +0000 (10:07 +0200)
* 'feat/3887/rename' of https://github.com/echoechoin/util-linux:
  rename: fix buffer overflow by using PATH_MAX instead of unreliable st_size
  rename: add --copy option to copy instead of rename

1  2 
misc-utils/rename.1.adoc

index 814f49ef618179326fb7196ab4d7690097253296,9353b697f9a0d52f8403b68de0455a83756bdcaf..31b149173ba63d51944444a74b4869b4a0f649c9
@@@ -29,8 -29,11 +29,11 @@@ rename - rename file
  == OPTIONS
  
  *-s*, *--symlink*::
 -Do not rename a symlink but change where it points.
 +Do not rename a symbolic link but change where it points.
  
+ *-c*, *--copy*::
+ Copy files instead of renaming them. The original files remain unchanged. For regular files, the content is copied and permission bits (*S_IRWXU*|*S_IRWXG*|*S_IRWXO*) are preserved, but ownership, timestamps, and extended attributes are not. For symbolic links, a new link with the same target is created.
  *-v*, *--verbose*::
  Show which files were renamed, if any.