≡ Menu

How to Copy and Overwrite Existing Files and Directory in Linux

Here is the command how to be able to copy a fil or directory and replace the destination if already existing.

i’m using “Bash”

cp -fR /source/src_directory /destination/dest_directory
e.g: cp -fR /home/test1/* /home/test2/
{ 1 comment… add one }
  • Jack April 9, 2013, 3:12 pm

    Well, thanks for sharing the command. Now I know to copy a fil or directory and replace the destination if already existing.

Leave a Comment

*