I am going over some documentation pertaining to creating a distro repo. However, I cannot understand exactly what these commands perform:
# cd /mnt/ # ls centos-1 centos-2 centos-3 # for i in 1 2 3 > do > cd /mnt/centos-$i > tar cpf - . | ( cd /var/ftp/ks/centos/; tar xpf - ) > done
My (obviously incorrect) rundown of it is: Loop through every mounted CD (
/mnt/centos-<index>) and create a
tar of the folder preserving the permissions. Then, extract that
tar file to another folder, again, preserving permissions.
If that is the case, why do it like this? Is there really not a better way? Or perhaps I'm missing the whole idea.