![]() This allows you to select files and folder in groups or batches rather than having to specify each and every folder name separately. You can choose which metadata field you like to preserve by specifying it with the –preserve option.Īs with almost every Linux command argument, you can use wildcards when specifying the folder locations. –preserve=mode,ownership,timestamps (-p): The -p option will preserve the default metadata of the files such as the mode, ownership and timestamps.Files that already exists at the target will not needlessly be rewritten unless it has been changed at the source. –update (-u): Specifying this option will ensure that only updated files are copied. ![]() –verbose (-v): This will provide some extra information in the console during the copy, like the files that are being copied or overwritten etc.–interactive (-i): This option will prompt you before it overwrites any files or folders, so that you can choose to overwrite or not on a file to file basis.We will go through some of the popular and most commonly used options. There are several options available while copying a folder. ![]() Also, you can copy a directory only into another existing directory. So, in order to copy directories, the –recursive (or -r) is a mandatory option. When copying directories, it does not make sense to copy them with out copying its contents as well, such as files and sub-folders. The option -r ( -R, -r or –recursive) specifies that it is a recursive copy. Where source is the location of the original copy of the file or folder and destination is the final location of the file or folder. The most simplistic and generic format of the command to copy a directory is cp is a simple command that takes two arguments: the source and the destination. This command is used to copy either a file or a folder or both. In Linux or Unix operating systems, the command to copy a folder or file is cp, commonly known as the cp command. All file managers in the desktop environments makes it as easy as a drag and drop, so we are going to just look at the command line option. This process differs from a move process where the original file is deleted after the file is recreated at the new location, leaving just one copy of the file. After the end of the copy process you will have two identical copies of the same file at two different locations. A copy is a process where a duplicate of the original file or folder is created at another location. Often times you need to copy a folder or file to another location or into another folder.
0 Comments
Leave a Reply. |