2.10.12. Encoding conversion of file and directory names

On hosting, file and directory names are encoded in UTF—8 encoding, so if you copy files or directories with name encoding in CP—1251 (which is used in Windows) and Cyrillic characters are present in their name, they need to be recoded.

  1. Connect via SSH to the server.
  2. Run the command:
    convmv -r -f cp1251 -t utf8 --notest ~/path/

    In a team:

    • -r — change the encoding in all nested directories.
    • -f — initial encoding.
    • -t - final encoding (usually utf8).
    • –notest — change the encoding without manual confirmation for each file or directory.
    • ~/path/to/dir is the path to the directory whose contents are to be processed. For example:
      • ~/path/to/dir — all files and subdirectories in the directory ~/path/to/dir/.
      • ~/path/to/files/*.png — all files with the extension .png in the catalog /path/to/files/.
      • . - all files and subdirectories in the current directory. Note The path to the current directory can be found with the command pwd.