set series = usno
if ( ! -e ut1.${series}  ) \cp -p ~/gg/tables/ut1.${series}  .

I'm trying to grasp a script. I need to know that what cp -p command works in this script?

  • Read the manpage man cp..it is described precisely there..also your script has many issues....
    – heemayl
    May 26 '15 at 15:21
  • from man cp: p or --preserve: preserve the specified attributes
    – Ron
    May 26 '15 at 15:24

From the cp manpage:

       preserve the specified attributes (default: mode,ownership,time‐
       stamps), if  possible  additional  attributes:  context,  links,
       xattr, all

-p     same as --preserve=mode,ownership,timestamps

In other words, it will preserve more metadata than it would by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.