The timestamp of the original file is inherited during copying.Ĭp -preserve=timestamp text.txt text1.txt The ownership of the original file is inherited when it is copied.Ĭp -preserve=ownership text.txt text1.txt The mode of the original file is inherited during copying.
Copies the file with the same permission settings and metadata as the original.Ĭp -a text.txt /home/user/destinationfolder/Ĭp -archive text.txt /home/ user/destinationfolder/Ĭreates a copy in the buffer if the original and the destination have the same file name but different contents.Ĭp -b text.txt /home/user/destinationfolder/Ĭp -backup text.txt /home/user/destinationfolder/Ĭreates a new numbered file if the original and destination have the same file name but different contents.Ĭp -backup=numbered text.txt /home/user/destinationfolder/Ĭreates a new numbered file if the original and destination have the same file name but different contents – and there are already numbered backups.Ĭp -backup=existing text.txt /home/user/destinationfolder/Ĭp -d text.txt /home/user/destinationfolder/Ĭp -f text.txt /home/user/destinationfolder/text.txtĬp -force text.txt /home/user/destinationfolder/text.txtĪsks permission before overwriting files with the same name.Ĭp -i text.txt /home/user/destinationfolder/Ĭp -interactive text.txt /home/user/destinationfolder/Ĭp -l text.txt /home/user/destinationfolder/Ĭp -link text.txt /home/user/destinationfolder/Ĭp -n text.txt /home/user/destinationfolder/Ĭp –no-cobbler text.txt /home/user/destinationfolder/Īttributes of the original file are inherited during copying.