How to get rid of bad chrs?

rikona rikona at sonic.net
Mon Aug 2 19:21:47 UTC 2021


On Mon, 2 Aug 2021 02:31:51 +0200
Ralf Mardorf via ubuntu-users <ubuntu-users at lists.ubuntu.com> wrote:

> Hi,
> 
> are you using a preformatted external drive? Those drives are usually
> performatted by one of the Microsoft FAT file systems. If so,
> {g,}rsync can't preserve permissions and attributes and apart from
> this, item names aren't allowed to contain NUL, " * / : < > ? \ |.

Yes, I did - an NTSF drive. I was in a hurry. :-) I normally use ext.
That may be the problem - that list of chrs are the ones in errors, and
I usually ask grsync to preserve permissions. Since it only marks a
few hundred files, permissions may not be the problem [I did ask to do
that in the backup]. So, it looks like the chrs are the problem.

That may not be the only place with problems. When I tried to look at
a problem file in Dolphin, it did not show! Will such files not show up
in Kubuntu pgms? I could see it with ls/CLI, and it was a mess - had bad
chrs, other chrs not on the above list, and even 1 or 2 CR/LFs! No
wonder it was a problem. It was an older file, probably transferred
between comps [including to/from win] multiple times, and came from a
foreign source. In some sense it's amazing it's still here. :-)

> Either format the drive to use a compatible file system or use "tar".
> Inside an archive permissions and attributes are preserved on what
> ever file system it's written.

Next time I won't be in such a hurry and format it with ext. :-)

> If the item names shouldn't cause issues and if you don't need to
> preserve permissions and attributes, {g,}rsync might provide an option
> to not care about preserving permissions and attributes.

It does have that option, but I usually try to keep those.

Thanks for the help!

Rik





More information about the ubuntu-users mailing list