Converting charset of the filenames from one to another with rsync

Posted in linux, server, srvbox on 2014/03/07
Tags: , , , ,

Today a short tip about the --iconv option to rsync, which show how powerful rsync is.
With this option it can convert the character set of the filenames from one to another.
The syntax is very simple. The --iconv option takes two arguments: the local and the remote character set. For example --iconv=iso88591,utf8 converts filenames from the ISO-8859-1 to UTF-8 encoding. Using --iconv=. instructs rsync to detect both local and remote locale settings and decide about the character sets on both sites.

rsync -av --iconv=iso88591,utf8 src_dir dest_dir

Comments are closed.