I have accidentally deleted(in a way) or I can say dislocated reference to my /home/user/Desktop directory , Is there any way to undo what I have done.
The following Describes what I have done
$ cp xyz.java /home/user/Desktop
$ cp xyz1.java /home/user/Desktop
After these commands I am getting blank Desktop With wallpaper and when I try to open my Desktop Directory by
cd /home/user/Desktop
command it gives following not a directory
error
bash: cd: /home/user/Desktop: Not a directory
PS: Before copying the file to correct Desktop
Directory I mis-spelled Desktop
as Deskop
and system Created a file name Deskop
in my /home/user
folder when I opened it, the file contained data of xyz.java
in it.
could anyone guide me through this and also please tell me what happened to my Desktop files and If, they are now orphaned in my memory How do i restore them.I have one more question in my mind after this Disaster:
How do I undo the commands and their execution results with command-line?
cp
never deletes an existing directory. Either this wasn't the only thing you did, or something else happened that makes that directory inaccessible. – David Foerster Feb 08 '15 at 19:19http://askubuntu.com/questions/403883/data-recovery-with-testdisk
is this what you talking about – Chinmaya B Feb 08 '15 at 19:59