LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to retrieve mv deleted folder (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-retrieve-mv-deleted-folder-815725/)

hemanthm17 06-22-2010 01:41 PM

how to retrieve mv deleted folder
 
I lost my folder name "....hemanth" while moving the folder "....hemanth" to "Documents" using mv command in the terminal .As there is already a folder named Documents in that destination folder I lost folder.please help me in retrieving the folder as that folder is very important for me.please............
thanks in advance .

mryuck 06-22-2010 02:24 PM

mv also renames files.
You could have just renamed the directory "hemanth" to "Documents".
Or check inside the "Documents" directory for "hemanth" or another "Documents" directory.

pixellany 06-22-2010 02:38 PM

You would need to show us the exact commands you used, but I think you will find that it exists somewhere.

One thing to keep in mind: As long as the source and destination are on the same physical device (eg a partition), nothing actually gets **moved**. In these cases, "mv" really means "rename".

Consider 2 examples: You have files named "fred" and "alice", and you have a folder named "stuff"

mv fred stuff **This renames ./fred to ./stuff/fred Thus fred now appears to have been moved into the "stuff" folder. (Note that "." is a synonym for "current directory")

mv fred alice **This renames ./fred to ./alice and thus appears to erase whatever was in alice. It's not however really erased---the old data in alice is still on the disk, but the sectors have just been released to the filesystem for re-use.

From the above, we see that--by default--mv can wipe out the target, but probably will not wipe out the source.


All times are GMT -5. The time now is 05:39 AM.