LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I can't find my doucument (https://www.linuxquestions.org/questions/linux-newbie-8/i-can%27t-find-my-doucument-829249/)

kain_xiami 08-30-2010 02:16 AM

I can't find my doucument
 
hello
Today, I can't find my document where I am coding in yesterday, through "history" command, I am sure the path is right,
to my surprise, yesterday I copy the whole /Document to my HDD,but I can't find it in it either.
Thank you for your help, the code is for my course design, it is important for me

i92guboj 08-30-2010 02:39 AM

Assuming you know at least part of its name you could try to use the "locate" or "find" commands. There are GUI tools as well, but I hardly use them so I can't really suggest any for you to use.

Examples:

Code:

locate <part_of_filename>
Code:

find / -iname <beginning_of_filename>\*
If you can't find anything then the thing looks bad.

About your backup. I assume you copied everything to an external drive, a pen drive or something like that. Maybe the problem is that you did not unmount it correctly. If you don't unmount your disks before unplugging them then things like this will happen, just like when you don't use the safe unplugging feature in Windows. When you unmount a disk you are making sure that everything that's cached will be dumped to disk. Only when your OS says that the disk is umounted should you unplug your disk physically.

kain_xiami 08-30-2010 03:28 AM

Thank you ,use command "find /home/Document -mtime -2", I find another copy in other place, I can use it in litte change

repo 08-30-2010 03:48 AM

Just to clarify:
Locate only works, if you run updatedb.
Updatedb will make a database of all files on the disk.
So make sure the db is up to date.

Kind regards.


All times are GMT -5. The time now is 07:49 AM.