[CentOS] Mirroring Hard Drive

Tue Nov 18 08:07:27 UTC 2008
Jussi Hirvi <greenspot at greenspot.fi>

Matt (lm7812 at gmail.com) kirjoitteli (17.11.2008 18:42):

>> mkdir /mnt/org
>> mount /dev/hdx /mnt/org
>> mkdir /mnt/bckup
>> mount /dev/hdx /mnt/bckup
>> 
>> cp -af /mnt/org/* /mnt/bckup/.
> 
> Won't this command choke if there are too many files?  I think I have
> run into that before.

If it does, here's a way round (source: see the thread "[CentOS] ls and rm:
"argument list too long"").

for i in /mnt/org/*
do
    cp $i /mnt/bckup/
done

- Jussi
--
Jussi Hirvi * Green Spot
Topeliuksenkatu 15 C * 00250 Helsinki * Finland
Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi at greenspot.fi * http://www.greenspot.fi