Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
feat: cp & mv should not overwrite recently created files #631
Comments
|
@nfischer I would like to fix this issue.
Please correct me if I am wrong. |
|
@uttpal Help would be very appreciated! Yes, I believe your understanding is correct. If in doubt, you can always try out GNU cp/mv on a Linux system. |
|
@nfischer
|
You're right, I was mistaken. Thanks for double checking |
If you have a copy command like:
You should get an error that says something like:
We're currently silently overwriting files that we created in that same copy command, but should instead provide a warning and refuse to copy the second file.
The behavior should stay the same with
-fand-r, butcpdoes not give the warning with directories or their contents.The warning is never present with the
-nflag.This warning should also be presented for the
mvcommand.