DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-10-24 20:13:11

unmesh
Member
Registered: 2008-03-26
Posts: 55

Need to copy file attributes

I copied a terabyte of files from one volume to another at the shell prompt level but used "cp -R" instead of "cp -aR" so that the attributes are not the same.

Is there a command that would copy only the attributes over?

Much obliged.

Last edited by unmesh (2010-10-24 20:14:55)


DNS-323 FW1.10B7 WD20EARS_2TB Samsung_HD753LG_750G FFP_0.5
DNS-321 FW1.03  FFP_0.7 (Spare enclosure)
DNS-320 FW2.02 Hitachi_HDS5C3020ALA632_2TB Hitachi_HDS721010KLA330_1TB FFP_0.5

Offline

 

#2 2010-10-25 20:31:37

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Need to copy file attributes

One can write a script to make the file attributes the same.  I don't know of an existing command to do that.

If the files are "pure data" files that will be shared in a samba share, you can use chmod to recursively set all the permissions to 777.  That will make it easier to have the files accessible via a samba share.  All files written via the samba share are given 777, so if you are just copying from one share to another, this would work.  Some people chown the files to root, but that should not be needed.

By "pure data", I mean things like media files, and not things that you would execute on the DNS CPU such as programs in the /ffp directory, and so on.

If your data is more complicated, then be careful.  For example, you might backup all or part of another Linux system to the DNS-323 with rsync or something, bypassing the share mechanism.  Here, you obviously would not want to change all permissions to a single value.

But, yeah, if it is just a bunch of movie files in a share, I'd just zap them all to 777 instead of trying to preserve the attributes from another copy.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#3 2010-10-26 09:31:23

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Need to copy file attributes

rsync -a OLD NEW

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB