Subj : Re: Copy files without changing ownership and permissions To : comp.os.linux,comp.os.linux.redhat From : Jeffrey Bird Date : Tue Dec 07 2004 02:51 am In comp.os.linux.redhat Anthony E. Greene wrote: > thegodorange wrote in message news:... >> Ross wrote: >> > Hi there, >> > My Linux file server has an ext3 partition for user's home directories. I >> > have just added a new and big ext3 partition. >> > I (root) would like to copy (cp) all users' files to the new partition. But >> > any files copied to the partition will change their ownership to root, and >> > permission to 755. >> > How can I keep their ownership and permissions? >> > Thanks in advance, >> > Ross >> > >> > >> look into the cp -a option >> for example, cp -a /home /newhome > > The problem I have with cp is that you don't get hidden files/dirs. > tar is intended to do what is needed here. cp -a will indeed copy "hidden" files and directories. The only time it wouldn't that I can think of would be if you did something like: cp -a * /newhome since the globbing doesn't pick up . files. Jeffrey Bird .