Re: Learning Bash Questions: the MV command

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

 



Here's some info to troubleshoot.  Something weird is definitely going
on.  That command should work.

>From the move info page of mv:

`--backup[=METHOD]'
     *Note Backup options::.  Make a backup of each file that would
     otherwise be overwritten or removed.

And in backup options:

`-b'
`--backup[=METHOD]'
     Make a backup of each file that would otherwise be overwritten or
     removed.  Without this option, the original versions are destroyed.
     Use METHOD to determine the type of backups to make.  When this
     option is used but METHOD is not specified, then the value of the
     `VERSION_CONTROL' environment variable is used.  And if
     `VERSION_CONTROL' is not set, the default backup type is
     `existing'.

     Note that the short form of this option, `-b' does not accept any
     argument.  Using `-b' is equivalent to using `--backup=existing'.

     This option corresponds to the Emacs variable `version-control';
     the values for METHOD are the same as those used in Emacs.  This
     option also accepts more descriptive names.  The valid METHODs are
     (unique abbreviations are accepted):

    `none'
    `off'
          Never make backups.

    `numbered'
    `t'
          Always make numbered backups.

    `existing'
    `nil'
          Make numbered backups of files that already have them, simple
          backups of the others.

    `simple'
    `never'
          Always make simple backups.  Please note `never' is not to be
          confused with `none'.


`-S SUFFIX'
`--suffix=SUFFIX'
     Append SUFFIX to each backup file made with `-b'.  If this option
     is not specified, the value of the `SIMPLE_BACKUP_SUFFIX'
     environment variable is used.  And if `SIMPLE_BACKUP_SUFFIX' is not
     set, the default is `~', just as in Emacs.

`--version-control=METHOD'
     This option is obsolete and will be removed in a future release.
     It has been replaced with `--backup'

Keep in mind there is a setting that hides backup files in the "ls"
command.  Is that on?  Via a shell alias perhaps?

>From the info page of ls:

`-B'
`--ignore-backups'
     Do not list files that end with `~', unless they are given on the
     command line.

The clobber setting of bash's doesn't effect mv.

>From the bash info page under the set command:

         `noclobber'
               Same as `-C'.

[...]

    `-C'
          Prevent output redirection using `>', `>&', and `<>' from
          overwriting existing files.


HTH
--
Sam Peterson
peabody@xxxxxxxxxxxxx
peabodyenator@xxxxxxxxx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux