AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Linux copy directory and contents3/15/2023 Should give you access to the complete manual.I accidentally copied the full contents of a directory into a destination directory instead of moving the full directory. If the info andĬp programs are properly installed at your site, the command The full documentation for cp is maintained as a Texinfo manual. There is NO WARRANTY, to the extent permitted by law. This is free software: you are free to change and redistribute it. License GPLv3+: GNU GPL version 3 or later Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.Ĭopyright © 2010 Free Software Foundation, Inc. Numbered if numbered backups exist, simple otherwiseĪs a special case, cp makes a backup of SOURCE when the force and backup options are given and SOURCE and DEST are the same name for an existing, regular Never make backups (even if -backup is given) Or through the VERSION_CONTROL environment variable. The version control method may be selected via the -backup option The backup suffix is '~', unless set with -suffix or SIMPLE_BACKUP_SUFFIX. The copy fails, or if -reflink= auto is specified, fall back to a standard copy. When -reflink is specified, perform a lightweight copy, where the data blocks are copied only when modified. Use -sparse= never to inhibit creation of sparse files. Specify -sparse= always to create a sparse DEST file whenever the SOURCE file contains a long enough sequence of version output version information and exitīy default, sparse SOURCE files are detected by a crude heuristic and the corresponding DEST file is made sparse as well. Z, -context= CONTEXT set security context of copy to CONTEXT x, -one-file-system stay on this file system u, -update copy only when the SOURCE file is newer than the destination file or when the destination file is missing T, -no-target-directory treat DEST as a normal file t, -target-directory= DIRECTORY copy all SOURCE arguments into DIRECTORY S, -suffix= SUFFIX override the usual backup suffix s, -symbolic-link make symbolic links instead of copying strip-trailing-slashes remove any trailing slashes from each SOURCE argument sparse= WHEN control creation of sparse files. remove-destination remove each existing destination file before attempting to open it (contrast with -force) R, -r, -recursive copy directories recursively parents use full source file name under DIRECTORY c same as -preserve= context -no-preserve= ATTR_LIST don't preserve the specified attributes Preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: context, links, xattr, all p same as -preserve= mode,ownership,timestamps P, -no-dereference never follow symbolic links in SOURCE n, -no-clobber do not overwrite an existing file (overrides a previous -i option) L, -dereference always follow symbolic links in SOURCE H follow command-line symbolic links in SOURCE i, -interactive prompt before overwrite (overrides a previous -n option) d same as -no-dereference -preserve= links -f, -force if an existing destination file cannot be opened, remove it and try again (redundant if the -n option is used) copy-contents copy contents of special files when recursive b like -backup but does not accept an argument Make a backup of each existing destination file a, -archive same as -dR -preserve= all -backup Mandatory arguments to long options are mandatory for short options too. Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
0 Comments
Read More
Leave a Reply. |