Skip to main content
deleted 56 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 29
  • 156
  • 240

I am new in here. I am facing problem in Solaris system.I want to copy only when the SOURCE file is newer than the destination file or when the destination file is missing. As you know, this feature will work on Linux system on following command.

cp -u /source/*.txt /destination/ 

but when i am using this command on solaris system 10. Below is my outut:

cp: illegal option -- u Usage: cp [-f] [-i] [-p] [-@] f1 f2 cp [-f] [-i] [-p] [-@] f1 ... fn d1 cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [-@] d1 ... dn-1 dn 

Is there any solution?

I am new in here. I am facing problem in Solaris system.I want to copy only when the SOURCE file is newer than the destination file or when the destination file is missing. As you know, this feature will work on Linux system on following command.

cp -u /source/*.txt /destination/ 

but when i am using this command on solaris system 10. Below is my outut:

cp: illegal option -- u Usage: cp [-f] [-i] [-p] [-@] f1 f2 cp [-f] [-i] [-p] [-@] f1 ... fn d1 cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [-@] d1 ... dn-1 dn 

Is there any solution?

I want to copy only when the SOURCE file is newer than the destination file or when the destination file is missing. As you know, this feature will work on Linux system on following command.

cp -u /source/*.txt /destination/ 

but when i am using this command on solaris system 10. Below is my outut:

cp: illegal option -- u Usage: cp [-f] [-i] [-p] [-@] f1 f2 cp [-f] [-i] [-p] [-@] f1 ... fn d1 cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [-@] d1 ... dn-1 dn 

Is there any solution?

Tweeted twitter.com/StackUnix/status/692584914877722625
Source Link
Wasila
  • 113
  • 1
  • 1
  • 12

How to use cp -u on a Solaris system which does not support the -u option?

I am new in here. I am facing problem in Solaris system.I want to copy only when the SOURCE file is newer than the destination file or when the destination file is missing. As you know, this feature will work on Linux system on following command.

cp -u /source/*.txt /destination/ 

but when i am using this command on solaris system 10. Below is my outut:

cp: illegal option -- u Usage: cp [-f] [-i] [-p] [-@] f1 f2 cp [-f] [-i] [-p] [-@] f1 ... fn d1 cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [-@] d1 ... dn-1 dn 

Is there any solution?