bug#61105: cp/mv: want a fatal --no-clobber

2023-01-27 Thread Mike Frysinger
On 27 Jan 2023 23:59, Pádraig Brady wrote: > On 27/01/2023 20:52, Mike Frysinger wrote: > > basically i've been writing things like: > > if ! cp -n foo bar; then > >... error out because bar already exists, or otherwise failed ... > > fi > > > > when really i need to write: > > if [ -e bar ] |

bug#61105: cp/mv: want a fatal --no-clobber

2023-01-27 Thread Pádraig Brady
On 27/01/2023 20:52, Mike Frysinger wrote: i've been under the mistaken assumption that the -n/--no-clobber option exits non-zero when the target exists, but someone pointed out to me recently that it silently ignores existing files. can we get a setting to control this ? Yes --no-clobber={ski

bug#61105: cp/mv: want a fatal --no-clobber

2023-01-27 Thread Mike Frysinger
i've been under the mistaken assumption that the -n/--no-clobber option exits non-zero when the target exists, but someone pointed out to me recently that it silently ignores existing files. can we get a setting to control this ? basically i've been writing things like: if ! cp -n foo bar; then

bug#61050: mv: add support for --one-file-system

2023-01-27 Thread Pádraig Brady
On 27/01/2023 19:13, Paul Eggert wrote: On 2023-01-25 05:34, Mike Frysinger wrote: should there be a `--copy` flag to be able to undo `--no-copy` ? We can add one if there's a need, but mv doesn't have a --clobber option to match its --no-clobber and I'm hoping --no-copy is similar. personal

bug#61050: mv: add support for --one-file-system

2023-01-27 Thread Paul Eggert
On 2023-01-25 05:34, Mike Frysinger wrote: should there be a `--copy` flag to be able to undo `--no-copy` ? We can add one if there's a need, but mv doesn't have a --clobber option to match its --no-clobber and I'm hoping --no-copy is similar. personally i always argue against using negativ