maxsatula / ocp

Oracle Copy utility
GNU General Public License v2.0
13 stars 2 forks source link

Check file existence before overwrite #5

Closed maxsatula closed 9 years ago

maxsatula commented 10 years ago

Check file existence before overwrite (either local or remote)

maxsatula commented 9 years ago

Here is what we have for cp command:

  -i, --interactive            prompt before overwrite (overrides a previous -n
                                  option)
  -n, --no-clobber             do not overwrite an existing file (overrides
                                 a previous -i option)

By default, cp overwrites all files at destination. Not a good idea for ocp behavior

Consider having something like that

  -i, --interactive            prompt before overwrite (overrides a previous -y
                                  option)
  -y, --overwrite              overwrite an existing file (overrides
                                 a previous -i option)
maxsatula commented 9 years ago

Alternatively

  -i, --interactive            prompt before overwrite (overrides a previous -f
                                  option)
  -f, --force                  force overwrite an existing file (overrides
                                 a previous -i option)

This relates to transfers as well as --gzip and --gunzip modes