bug#8370: RFC: cp --no-preserve=contents

2012-04-12 Thread Pádraig Brady
On 04/12/2012 01:41 AM, Pádraig Brady wrote: On 03/28/2011 10:56 PM, Pádraig Brady wrote: On 28/03/11 21:55, Eric Blake wrote: cp --attributes-only is great for preserving all metadata attributes without corrupting contents, but what if I want to preserve only some of the metadata (for

bug#8370: RFC: cp --no-preserve=contents

2012-04-12 Thread Jim Meyering
Pádraig Brady wrote: ... So thinking a bit more about this, and given the confusion expressed in the above bug report, perhaps it's best to change --attributes-only to _not_ truncate existing files? I think scripts relying on the truncation behavior of this relative new feature would be

bug#8370: RFC: cp --no-preserve=contents

2012-04-12 Thread Eric Blake
On 04/12/2012 08:20 AM, Pádraig Brady wrote: On 04/12/2012 03:04 PM, Jim Meyering wrote: Pádraig Brady wrote: ... So thinking a bit more about this, and given the confusion expressed in the above bug report, perhaps it's best to change --attributes-only to _not_ truncate existing files? I

bug#8370: RFC: cp --no-preserve=contents

2012-04-12 Thread Paul Eggert
I like this idea too. Some comments: Preserve the specified attributes of the original files in the copy, -but do not copy any data. See the @option{--preserve} option for -controlling which attributes to copy. +but do not copy any data. Data in existing destination files is not

bug#8370: RFC: cp --no-preserve=contents

2012-04-12 Thread Pádraig Brady
On 04/12/2012 03:04 PM, Jim Meyering wrote: Pádraig Brady wrote: ... So thinking a bit more about this, and given the confusion expressed in the above bug report, perhaps it's best to change --attributes-only to _not_ truncate existing files? I think scripts relying on the truncation

bug#8370: RFC: cp --no-preserve=contents

2012-04-12 Thread Pádraig Brady
On 04/12/2012 04:02 PM, Paul Eggert wrote: I like this idea too. Some comments: Preserve the specified attributes of the original files in the copy, -but do not copy any data. See the @option{--preserve} option for -controlling which attributes to copy. +but do not copy any data. Data

bug#8370: RFC: cp --no-preserve=contents

2012-04-11 Thread Pádraig Brady
On 03/28/2011 10:56 PM, Pádraig Brady wrote: On 28/03/11 21:55, Eric Blake wrote: cp --attributes-only is great for preserving all metadata attributes without corrupting contents, but what if I want to preserve only some of the metadata (for example, copying SELinux context but _not_

bug#8370: RFC: cp --no-preserve=contents

2011-03-28 Thread Pádraig Brady
On 28/03/11 21:55, Eric Blake wrote: cp --attributes-only is great for preserving all metadata attributes without corrupting contents, but what if I want to preserve only some of the metadata (for example, copying SELinux context but _not_ timestamps or content)? It seems like

bug#8370: RFC: cp --no-preserve=contents

2011-03-28 Thread Eric Blake
cp --attributes-only is great for preserving all metadata attributes without corrupting contents, but what if I want to preserve only some of the metadata (for example, copying SELinux context but _not_ timestamps or content)? It seems like --attributes-only would be a great synonym for