Skip to content

Feature request: --truncate-long-names option #891

@dims12

Description

@dims12

When copying files from filesystems that allow longer filenames (e.g. Windows NTFS,
which stores filenames as UTF-16 allowing 255 UTF-16 code units) to Linux ext4/xfs
which limits filenames to 255 bytes, rsync currently fails with ENAMETOOLONG and
skips the file entirely.

A --truncate-long-names option would allow rsync to truncate the filename to fit
within the destination filesystem's limit, preserving the file content. The truncated
name could preserve the extension.

This is a real use case when migrating libraries from Windows to Linux where filenames
contain multibyte UTF-8 characters (e.g. Cyrillic, CJK) that were valid on NTFS but
exceed 255 bytes in UTF-8 encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions