[SWLUG] Backing up took 3 days
James
Diagmato at black0ps.com
Mon Dec 5 20:52:04 UTC 2005
Steve Hill wrote:
> On Mon, 5 Dec 2005, Neil Greenwood wrote:
>
>> Using ".*" in a directory sometimes includes "." and ".." in the list of
>> files to process. And doing it recursively, it includes the whole
>> directory
>> tree starting from "/".
>
>
> It shouldn't go all the way back to / - it'll just grab the parent
> directory (and it's children).
>
> A useful shell glob to grab all the dot files is .[^.]* (it's not
> quite complete since it won't get files starting with "..", but close
> enough for most uses)
>
True - it went up a directory, and copied everything from the parent
directory aswell. Didn't notice that before - thanks for pointing it out.
Someones also told me that the choice of flags are unusual, specifically
the 'f' flag - "force file to be copied if the destination file cannot
be opened" - that to me sounded like "if the destination file is
corrupt, retry". Am I wrong in thinking like that? I read through the
man pages but could not find what was wrong with the command.
I was also told that the cp command should copy all files which the ln
command will see, with the same parameters. For example:
ln -R /home/james/*
Lists everything in my home directory, but:
cp -fvr /home/james/*
ignored anything beginning with a dot.
More information about the Swlug
mailing list