* [RFE] --reference option for setfattr
@ 2008-11-04 9:50 Ales Zelinka
2008-12-22 13:01 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Ales Zelinka @ 2008-11-04 9:50 UTC (permalink / raw)
To: linux-xfs
Hello,
currently when I want to copy all extended attributes from one file to
another, I have to use ugly command like this:
getfattr --dump -m '-' /etc/samba/smb.conf |sed 's;file:
etc/samba/smb.conf;file: /tmp/smb.conf;'| setfattr --restore=-
Would you please implement --reference=some_file option that will read
all extended attributes set on some_file and set them on pathname?
The previous use case would then look like this:
setfattr --reference=/etc/samba/smb.conf /tmp/smb.conf
Other commands from file-attributes-manipulation familly already have
parameter like this (chmod, chown, chcon,...)
Thanks
Ales Zelinka
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFE] --reference option for setfattr
2008-11-04 9:50 [RFE] --reference option for setfattr Ales Zelinka
@ 2008-12-22 13:01 ` Christoph Hellwig
2008-12-22 13:47 ` Andreas Gruenbacher
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2008-12-22 13:01 UTC (permalink / raw)
To: Ales Zelinka; +Cc: linux-xfs
On Tue, Nov 04, 2008 at 10:50:58AM +0100, Ales Zelinka wrote:
> currently when I want to copy all extended attributes from one file to
> another, I have to use ugly command like this:
>
> getfattr --dump -m '-' /etc/samba/smb.conf |sed 's;file:
> etc/samba/smb.conf;file: /tmp/smb.conf;'| setfattr --restore=-
>
> Would you please implement --reference=some_file option that will read
> all extended attributes set on some_file and set them on pathname?
>
> The previous use case would then look like this:
>
> setfattr --reference=/etc/samba/smb.conf /tmp/smb.conf
>
> Other commands from file-attributes-manipulation familly already have
> parameter like this (chmod, chown, chcon,...)
This feature seems useful to me, any chance you could try coming up with
a patch?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFE] --reference option for setfattr
2008-12-22 13:01 ` Christoph Hellwig
@ 2008-12-22 13:47 ` Andreas Gruenbacher
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Gruenbacher @ 2008-12-22 13:47 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs, acl-devel, Ales Zelinka
On Monday, 22 December 2008 14:01:03 Christoph Hellwig wrote:
> On Tue, Nov 04, 2008 at 10:50:58AM +0100, Ales Zelinka wrote:
> > currently when I want to copy all extended attributes from one file to
> > another, I have to use ugly command like this:
> >
> > getfattr --dump -m '-' /etc/samba/smb.conf |sed 's;file:
> > etc/samba/smb.conf;file: /tmp/smb.conf;'| setfattr --restore=-
> >
> > Would you please implement --reference=some_file option that will read
> > all extended attributes set on some_file and set them on pathname?
> >
> > The previous use case would then look like this:
> >
> > setfattr --reference=/etc/samba/smb.conf /tmp/smb.conf
> >
> > Other commands from file-attributes-manipulation familly already have
> > parameter like this (chmod, chown, chcon,...)
>
> This feature seems useful to me, any chance you could try coming up with
> a patch?
getfattr/setfattr are modeled similar to getfacl/setfacl, and with those two
tools you can do this (-b stands for --remove-all):
getfacl /etc/samba/smb.conf | setfacl -b -M - /tmp/smb.conf
Would it make sense to implement this in setfattr in a similar way?
A -b option would be handy in this context as well, of course.
But maybe --reference is more convenient sometimes, and so it should be added
in any case?
Thanks,
Andreas
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-22 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-04 9:50 [RFE] --reference option for setfattr Ales Zelinka
2008-12-22 13:01 ` Christoph Hellwig
2008-12-22 13:47 ` Andreas Gruenbacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox