[wplug] Simple CP question..
Jonathan S Billings
billings at negate.org
Fri Apr 2 11:41:55 EST 2004
On Fri, 2004-04-02 at 11:36, mikeslists at access995.com wrote:
> Trying to move a home folder to another path.. trying to just use the cp command recursivly.
>
> How can I tell cp to copy the hidden folders?
>
> I tried cp .* /blah/blah but this wound up trying to copy everything below my home folder too since .* would naturally include ..
>
> If that makes sense to you, and help would be much appreceated!
>
> -Mike
If you must use cp, try copying the directory recursively, rather than
trying to get everything with a glob. For example,
cp -r /home/billings /backup/home/
If you are really trying to just get the dot-files and dot-directories,
you could use cp -r .??* (assuming that all dotfiles are longer than
three characters). This'll skip '.' and '..'.
You probably would do better by not using cp at all, and use tar, rsync,
etc. to copy everything.
--
Jonathan S Billings <billings at negate.org>
More information about the wplug
mailing list