Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/examples/cp3.html
Дата изменения: Fri Jan 17 12:43:16 1997 Дата индексирования: Mon Oct 1 23:16:31 2012 Кодировка: |
To copy a file from your current working directory to a subdirectory:
cp fig2 part2/figure2
This copies the file fig2 from your current working directory to the file figure2 in the subdirectory part2.
To copy a file to the parent directory:
cp mail.txt ..
This copies the file mail.txt to the directory immediately above the current working directory.
The .. (dot dot) is shorthand for the parent directory.
To copy a file from a subdirectory to a directory elsewhere in the file system:
cp docs/vi.Z /tmp
This copies the file vi.Z in the subdirectory docs to the directory /tmp.
To copy a file to your home directory:
cp /usr/local/doc/ue.txt $HOME
This copies the file ue.txt to your home directory. $HOME is the environment variable that contains the value for your home directory.