D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] rsync to usb disk

 

james kilty wrote:
> 
> It had a problem with the very small number of hidden files and could
> not save any (invalid argument (22)).

You backing up to a non-native file system by any chance?

Microsoft file systems are notorious for not coping with sensible file
names. What is really sad is that they still object to "con" "lpt1" etc
if the software you use happens to work with the old API. All deeply
messy in the name of backwards compatibility.

> What I cannot understand is why it listed most but not all files as it
> worked through everything in /documents/. (All seem to be there in the
> backup.) In some cases only a couple of files in a directory are listed
> - in others it would seem all of them are. To my simple mind, either
> only the files that are modified are listed or all are.

Probably the file metadata is changed, different owner, different
modification times, or some such. I expect what rsync is doing is logical.

> The other minor problem I had was trying to modify only a part of the
> saved file - a directory which had two words in its name with a space in
> between. If I need to do this in future, how do I deal with the space -
> is it %20 or something?

Sorry, not clear what you mean. If you mean how to refer to a file or
directory with a space in its name just escape the space with your
favourite method (single quote is highly recommended as a good escaping
habit to get into).

srw@derek:~$ mkdir fred\ astaire
srw@derek:~$ mkdir 'fred astaire/ginger rogers'
srw@derek:~$ ls "fred astaire"
ginger rogers

This is the same reason that is scripts variables for file names are
always "$FILE", so if it has a space in it, then the name is properly
escaped.


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html