BSD tar에서는 -s pattern
이름을 변환하는 옵션이 있습니다. freebsd.org 문서 에서 인용 :
-s pattern
Modify file or archive member names according to pattern. The
pattern has the format /old/new/[ghHprRsS] where old is a basic
regular expression, new is the replacement string of the matched
part, and the optional trailing letters modify how the replace-
ment is handled. If old is not matched, the pattern is skipped.
Within new, ~ is substituted with the match, \1 to \9 with the
content of the corresponding captured group. The optional trail-
ing g specifies that matching should continue after the matched
part and stop on the first unmatched pattern. The optional
trailing s specifies that the pattern applies to the value of
symbolic links. The optional trailing p specifies that after a
successful substitution the original path name and the new path
name should be printed to standard error. Optional trailing H,
R, or S characters suppress substitutions for hardlink targets,
regular filenames, or symlink targets, respectively. Optional
trailing h, r, or s characters enable substitutions for hardlink
targets, regular filenames, or symlink targets, respectively.
The default is hrs which applies substitutions to all names. In
particular, it is never necessary to specify h, r, or s.
-s
옵션을 제공하지만 지금은 전체 답변을 작성할 시간이 없습니다.