Thank you all very much for the replies. I will keep a copy of all options
although I have selected one among the 4. I will not say which one as I
imagine all would work and the choice was rather arbitrary.
I am overwhelmed by the number of distinct possibilities (approaches or
syntaxes). Instinctively, I initially thought about a solution along the
lines that Tony van der Hoff proposed. I am just not as 'Linux-fluent' as
you guys are.
Many thanks,
Roy
========================
Solutions (note to self)
__/ [Tony van der Hoff] on Friday 02 December 2005 18:22 \__
> Not entirely sure what you mean by 'top-level directories', but I would
> think that something along the lines of
> find ~ -depth 1 -name .* -exec cp {} /destination \;
> would do the job.
__/ [Tony Mountifield] on Friday 02 December 2005 18:16 \__
> You could do this:
>
> cp -R ~/.[^.]* /destination
>
> That has two effects: (a) requires at least one character after the '.',
> so eliminating '.', the current directory; (b) requires the second char
> not to be a '.', so eliminating '..', but also anything longer starting
> with '..'.
>
> Actually, you can overcome the latter by doing the following:
>
> cp -R ~/.[^.]* ~/..?* /destination
>
> I would probably cd to ~ first, and then just do:
>
> cp -R .[^.]* ..?* /destination
>
> Hope this helps!
>
> Cheers
> Tony
__/ [Darren Salt] on Friday 02 December 2005 18:52 \__
> #! /bin/bash
>
> GLOBIGNORE='.:..:*/.:*/..'
>
> cp -R ~/.* /destination
>
> (Yes, it's in the man page.)
__/ [John Rowe] on Friday 02 December 2005 18:17 \__
> does:
>
> cp -R ~/.[0-z]* /destination
>
> cover all the files you are interested in? If not it probably should!
>
> John
|
|