cp

CP(1)                              ç¨æ¶å½ä»¤                             CP(1)



å稱
       cp - è¤è£½æ件åç®é

æ¦è¿°
       cp [é¸é ]... [-T] ä¾æº ç®æ¨
       cp [é¸é ]... ä¾æº... ç®é
       cp [é¸é ]... -t ç®é ä¾æº...

æè¿°
       å¾æå®çä¾æºæ件è¤è£½å°ç®æ¨èï¼æèå°å¤åæºæ件è¤è£½å°ç®æ¨ç®éä¸ã

       å¿é¸åæ¸å°é·çé¸é åæé©ç¨ã

       -a, --archive
              è -dR --preserve=all ç¸åã

       --attributes-only
              ä¸è¦è¤è£½æ件æ¸æï¼ååè¤è£½å¶å±¬æ§å¼ã

       --backup[=æ§å¶åæ¸]
              ç²æ¯åå·²åå¨çç®æ¨æ件åµå»ºä¸åå份

       -b     é¡ä¼¼ --backupï¼ä½æ¯ä¸æ¥ååæ¸

       --copy-contents
              éæ¸æ¨¡å¼ä¸è¤è£½ç¹æ®æ件çå§å®¹

       -d     è --no-dereference --preserve=links ç¸å

       -f, --force
              å¦ææä¸åå·²åå¨ä¸ç¡æ³æéçç®æ¨æ件ï¼åªé¤ä¹ä¸¦é²è¡é試ï¼è©²é¸é å¨ -n
              é¸é åæ被使ç¨æç¡æï¼

       i, --interactive
              è¦å¯«åé²è¡æ示ï¼è¦èååç -n é¸é ï¼

       -H     è·é¨æºæ件å½ä»¤è¡ä¸é¡¯å¼çµ¦åºç符èéæ¥

       -l, --link
              使ç¨ç¡¬éæ¥å代è¤è£½

       -L, --dereference
              總æ¯è·é¨æºæ件ä¸ç符èéæ¥

       -n, --no-clobber
              ä¸è¦è¦å¯«å·²æçæ件ï¼è¦èåå給åºç -i é¸é ï¼

       -P, --no-dereference
              æ°¸é ä¸è¦è·é¨æºæ件ä¸ç符èéæ¥

       -p     è --preserve=mode,ownership,timestamps ç¸å

       --preserve[=屬æ§å表]
              ä¿çæå®ç屬æ§ï¼é»èªï¼æ¨¡å¼ãå¾å±¬éä¿ãæéæ³ï¼ï¼å¦æå¯è½ç話éæé¡å¤å±¬æ§ï¼ä¸ä¸æãéæ¥ï¼linksï¼ãxattrãall

       --no-preserve=屬æ§å表
              ä¸è¦ä¿çæå®ç屬æ§

       --parents
              å¨ç®æ¨ç®éä¸ä½¿ç¨å®æ´çæºæ件å

       -R, -r, --recursive
              éæ¸å°è¤è£½æ件

       --reflink[=WHEN]
              æ§å¶åé/寫å¥æè¤è£½ï¼CoWï¼å¯æ¬ã詳æè¦ä¸æ

       --remove-destination
              å¨å試æéæ¯åå·²åå¨çç®æ¨æ件ä¹åå°å¶é²è¡åªé¤ï¼å --force è¡ç²ç¸åï¼

       --sparse=WHEN
              æ§å¶ç¨çæ件çåµå»ºã詳æè¦ä¸æ

       --strip-trailing-slashes
              移é¤æ¯åæºæ件åæ¸å¾çä»»ä½æ«å°¾ææ§

       -s, --symbolic-link
              使ç¨ç¬¦èéæ¥ä»£æ¿è¤è£½

       -S, --suffix=å¾ç¶´å
              使ç¨çµ¦å®å稱代æ¿å¸¸ç¨å份å¾ç¶´å

       -t, --target-directory=ç®é
              å°æææºæ件åæ¸çµ¦åºçå§å®¹è¤è£½å°ç®æ¨ç®éä¸

       -T, --no-target-directory
              å°ç®æ¨æ件ç¶ä½æ®éæ件å°å¾ï¼èä¸æ¯ç®éï¼

       -u, --update
              åå¨æºæ件æ¯ç®æ¨æ件æ°ï¼æèç®æ¨æ件ä¸åå¨çææ³ä¸è¤è£½

       -v, --verbose
              解éæ£å¨ç¼ççææ³

       -x, --one-file-system
              åçå¨ç¶åæ件系統ä¸

       -Z     å°ç®æ¨æ件 SELinux å®å¨ä¸ä¸æè¨ç½®ç²é»èªé¡å

       --context[=CTX]
              é¡ä¼¼ -Zï¼æèå¦æ給å®äºä¸ä¸æï¼CTXï¼é£éº¼å° SELinux æè SMACK
              å®å¨ä¸ä¸æè¨ç½®ç²çµ¦å®å¼

       --help 顯示æ¤å¹«å©ä¿¡æ¯ä¸¦éåº

       --version
              顯示çæ¬ä¿¡æ¯ä¸¦éåº

       é»èªææ³ä¸ï¼ç¨åºæ使ç¨ä¸ç¨®ç²ç³çåç¼å¼ç®æ³æ¢æ¸¬æºæ件æ¯å¦æ¯ç¨ççï¼è¥å¤å®ç²ç¨çï¼åç®æ¨æ件ä¹æ以ç¨çå½¢å¼åµå»ºãéåè¡ç²å¯ä»¥éé
       --sparse=auto æå®ãè¥æå®
       --sparse=alwaysï¼å°å¨æºæ件åå«è¶³å¤ å¤å§å®¹ç²é¶çå‐
       ç¯åºåæå°å¶è¦ä½ç¨çæ件ãä½¿ç¨ --sparse=never 以ç¦æ¢åµå»ºç¨çæ件ã

       ç¶æå®äº --reflink[=always] æï¼é²è¡è¼éç´è¤è£½ï¼å¶ä¸‐
       çæ¸æå¡åå¨è¢«ä¿®æ¹æé²è¡å¾©å¶ãå¦æé樣çè¤è£½å¤±æï¼æç¡æ³å¯¦è¡ï¼æèæå®äº
       --reflink=auto æï¼åéå°æ¨æºè¤è£½ã

       å份çå¾ç¶´ç²â~âï¼é¤éè¨ç½®äº --suffix æè
       SIMPLE_BACKUP_SUFFIXãçæ¬æ§å¶æ¹å¼å¯ä»¥ä½¿ç¨ --backup é¸é æè
       VERSION_CONTROL ç°å¢è®éé²è¡æå®ãå¯ç¨çå¼å¦ä¸ï¼

       none, off
              æ°¸é ä¸è£½ä½å份ï¼å³ä½¿çµ¦åºäº --backup ï¼

       numbered, t
              製ä½ç·¨èçå份

       existing, nil
              å¦æ已編èå¯æ¬åå¨åç·¨èï¼å¦åæ¡ç¨ç°¡å®æ¹å¼

       simple, never
              總æ¯è£½ä½ç°¡å®å份

       ä½ç²ä¸åç¹ä¾ï¼cp å°å¨åæçµ¦åº force é¸é è backup
       é¸é ï¼ä¸¦ä¸æºæ件åç®æ¨æ件æ¯åä¸åå·²åå¨æ®éæ件çææ³ä¸è£½ä½å份å¯æ¬ã

ä½è
       ç± Torbjorn GranlundãDavid MacKenzie å Jim Meyering 編寫ã

å ±åé¯èª¤
       GNU coreutils çå¨ç·å¹«å©ï¼ <http://www.gnu.org/software/coreutils/>
       è«å <http://translationproject.org/team/zh_CN.html> å ±å cp çç¿»è‐
       ¯é¯èª¤ã

çæ¬
       Copyright © 2017 Free Software Foundation, Inc.  License GPLv3+: GNU
       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
       This is free software: you are free to change and redistribute it.
       There is NO WARRANTY, to the extent permitted by law.

åè¦
       å®æ´ææªè«è¦ï¼ <http://www.gnu.org/software/coreutils/cp>
       æèå¨æ¬å°ä½¿ç¨ï¼ info '(coreutils) cp invocation'

è·
       æ¬é é¢ä¸æçç±ä¸æ man æåé è¨åæä¾ã
       ä¸æ man æåé è¨åï¼https://github.com/man-pages-zh/manpages-zh



GNU coreutils 8.28                2017å¹´10æ                             CP(1)