Bug 640604 - Please add -n option to mv applet
Summary: Please add -n option to mv applet
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: busybox
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Denys Vlasenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-06 12:56 UTC by Ivana Varekova
Modified: 2011-11-01 12:43 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-11-01 12:43:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch (1.82 KB, patch)
2010-10-09 14:03 UTC, Michal Srb
no flags Details | Diff

Description Ivana Varekova 2010-10-06 12:56:12 UTC
Description of problem:
busybox contain applet mv, there are implemented several options but option -n
is missing, could this option be implemented as well?

Version-Release number of selected component (if applicable):
busybox-1.17.2


Steps to Reproduce:
1. $ busybox mv --help
...
Options:
	-f	Don't prompt before overwriting
	-i	Interactive, prompt before overwrite


2. $ wc --help
...
Mandatory arguments to long options are mandatory for short options too.
      --backup[=CONTROL]       make a backup of each existing destination file
  -b                           like --backup but does not accept an argument
  -f, --force                  do not prompt before overwriting
  -i, --interactive            prompt before overwrite
  -n, --no-clobber             do not overwrite an existing file
If you specify more than one of -i, -f, -n, only the final one takes effect.
      --strip-trailing-slashes  remove any trailing slashes from each SOURCE
                                 argument
  -S, --suffix=SUFFIX          override the usual backup suffix
  -t, --target-directory=DIRECTORY  move all SOURCE arguments into DIRECTORY
  -T, --no-target-directory    treat DEST as a normal file
  -u, --update                 move only when the SOURCE file is newer
                                 than the destination file or when the
                                 destination file is missing
  -v, --verbose                explain what is being done
      --help     display this help and exit



Expected results:
busybox mv will accept "-n" option if it is used it does not overwrite the existing files

Comment 3 Michal Srb 2010-10-09 14:03:22 UTC
Created attachment 452516 [details]
proposed patch

generated against busybox-1.17.2

Comment 4 Ivana Varekova 2010-10-12 08:16:45 UTC
Thanks for the patch :), I'm reassigning this bug to BusyBox maintainer.

Comment 5 Denys Vlasenko 2010-10-26 13:59:46 UTC
Applied to git, thanks!

Comment 6 Denys Vlasenko 2011-11-01 12:43:38 UTC
1.19.3 is in rawhide now:

http://koji.fedoraproject.org/koji/buildinfo?buildID=271674

and it addresses this BZ


Note You need to log in before you can comment on or make changes to this bug.