Linux Server and Workstation Configuration How To

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
cp PDF Print E-mail
Friday, 04 December 2009 18:09
AddThis Social Bookmark Button

Command cp

cp command copies files and directories.

Syntax

cp [options] source_file destination_file
cp [options] source_file destination_directory

Options

-a preserves all the attributes of a file.
-b creates a backup copy before copying the file.
-d copy the link, but not the file pointed to by this reference.
-i asks for confirmation before overwriting files.
-l creates hard links instead of copying files.
-p preserves the owner, permissions and time stamp of the file.
-r recursively copies the files in all subdirectories.
-s creates a soft link instead of copying files.
-u copies the file only if it is newer than the destination file.
-v verbose during the copy process.
-help displays help for the team.

Description

Team cp copies one file to another. You can also copy multiple files from one directory to another.

 

Add comment


Security code
Refresh

Useful Links

Follow us on ...

  • Digg: hgevs
  • Facebook Page: 180986722511
  • Linked In Group: 2571120
  • Ning: linuxconfignet
  • Twitter: linuxconfignet

Friends

Thanks David Ayvazyan for provided useful information and discussions.
www.gnu.am (Armenian Translation)