I meant to do this:
cp -rp -i /cygdrive/c/folder /cygdrive/e/anotherfolder/
But I accidentally hit enter after this:
cp -p -i /cygdrive/c/folder /cygdrive/e/anotherfolder/
And now the contents of ~/Documents/anotherfolder/
is empty because ~/Documents/folder
was not a regular file (it was a directory). I'm surprised this was the outcome (contents of anotherfolder
removed) and there was no error given.
Are the contents of /cygdrive/e/anotherfolder/
? I would appreciate any advice... Thanks. (This is on cygwin running on Windows XP)
EDIT I think the data is still there, as the folder had about 1.5 TB of data and hard disk usage indicates that this data is not cleared off.
cp
doesn't delete anything, it may overwrite a target if it exists already. As you specified the-i
flag, no harm should be done.