kmfkmommy.blogg.se

Linux quick text paste
Linux quick text paste






linux quick text paste

We will use the option “-a” instead of “-r” or “-R” optionsĬommand : cp -a /application/Praveen/Testing /application/Praveen/Backup/ħ. If we want to copy the file in interactive mode, then we will use the option “-i”.Interactive Mode work if the same file already exists in the target directory already.Ĭommand : cp -i /application/Praveen/file1.txt /application/Praveen/Backup/ Copying the file in interactive mode (-i) Multiple file copy at the same timeĬommand : cp /application/Praveen/file1.txt /application/Praveen/file2.txt /application/Praveen/Backup/ģ. The above output shows that the file has been copied at the target directory.

linux quick text paste

Suppose we want to copy the /application/Praveen/file.txt file to /application/Praveen/Backup directory, so need to run below:Ĭommand : cp /application/Praveen/file.txt /application/Praveen/Backup

linux quick text paste

Now let us discuss each option with an example for a better understanding of the concept. cp -v: This option stands for verbose which means that will it print all the process which happens on a file while copying. cp -u: This means update, copy when the source file is new than the destination file.ĩ. cp -R: This option means recursive copy means that it will copy all files with a cascading directory including hidden file.Ĩ. cp -n: This Option is used not to overwrite any existing file.ħ. cp -L: It is will create a symbolic link for the file.Ħ. cp -l: This option is used to link file with other existing ones instead of copying it.ĥ. cp -i: This option stands for interactive mode, which means that it will ask the user to overwrite the file by prompt.Ĥ. It is applicable if the file is already in use.ģ. cp -f: This option forcefully copy the files even it may remove the target file if needed. cp -a: This option is used to archive the existing files in the directory for retention purpose.Ģ.








Linux quick text paste