bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to 'mv' - suppress chmod/chown


From: Jim Meyering
Subject: Re: Patch to 'mv' - suppress chmod/chown
Date: Mon, 24 Mar 2003 20:43:58 +0100

Thank you for the patch.
This will be fixed pretty soon by making the existing
--no-preserve=ATTR_LIST option (currently only accepted by cp)
do what you want.  This is in the TODO file:

  cp --no-preserve=X should not attempt to preserve attribute X
    reported by Andreas Schwab

However, I'm not sure it's worth adding an option to mv to support that.

An alternative is to use a wrapper to filter out just those messages.
(replacing regex-for-offending-diagnostic with something useful)
Here's a little one I wrote:

#!/bin/sh
# Filter stderr of the given command without affecting stdout,
# and leave any unfiltered content on stderr.
exec 3>&1; ("$@" | sed 's/[^0-9].*//') 2>&1 >&3 \
  | grep -E -v 'regex-for-offending-diagnostic' 1>&2

Then, you can use it like this:

  filter-stderr mv your-files dir-on-losing-filesystem




reply via email to

[Prev in Thread] Current Thread [Next in Thread]