LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   reversed cp command (https://www.linuxquestions.org/questions/linux-newbie-8/reversed-cp-command-50600/)

chandan 03-19-2003 02:22 AM

reversed cp command
 
i had two files of same name in two different directories
i wanted to copy the updated file into the other directory overwriting the old file
but unfortunately i reversed the order of the files in the copy command
i have overwritten the updated file
is there any way i could get back this file

ranger_nemo 03-19-2003 07:02 AM

Unless you had a backup somewhere, no.

If it was a text file, some editors will make a backup in the same directory as the original. Usually it adds a tilde ~ to the end of the name. file.txt --> file.txt~

Otherwise, once you overwrite a file, it's gone. The new file writes to the same blocks on the hard-drive as the old one, so there isn't any recovery.


All times are GMT -5. The time now is 05:44 PM.