alekg (alekg) wrote in lpi_help,
alekg
alekg
lpi_help

  • Mood:

cp

cp     list directory contents


This again is one those of usefull old Unix programs. It basically copies files and directories.


cp [OPTIONS]...[FILES] [SOURCE][DEST]
cp [OPTIONS]...[FILES]...[SOURCE]...[DEST]
cp [OPTIONS]...--targetdirectory=DIRECTORY[SOURCE]


-a or --archive     archive. Same as -dpR
-i or --interactive      prompt before overriding
-l or --link      link files instead of copying
-p     preserve mode, ownership,timestamps
--preserve[=ATTR-LIST]      same as -p, but able to specify attributes.
--no-preserve     don't preserve attributes
-R or -r or recursive     copies directories recursively
--sparse[=WHEN]     controls creation of sparse files. Auto,always and never are the options.
-v or --verbose     print what is being done
-u or update     copy when the source is newer than destination or destination file is missing

There is nothing complicated about this command. Yet, sometimes you would be forced to use some of it's options. Another thing I forgot to mention is you could use wildcards SOURCE and DEST(not sure) arguments. For a tutorials of wildcards see my future blogs..
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

  • 0 comments