LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   retrieving my file (https://www.linuxquestions.org/questions/linux-newbie-8/retrieving-my-file-667961/)

Chris106 09-06-2008 08:57 AM

retrieving my file
 
My hard drive isn't working (new crappy comp defect) so I'm working of my disk. Something made my comp feeze and I had to reboot. Just before it froze I was about to save an important file on a disk so crap, it didn't save. If I go into 'File System', then 'User' or 'Temp', I see a file that prob is it. I've tried to open it with 'Office Word Possessor' and many other programs. I know there is a way to retrieve this but please give me some suggestions.

jschiwal 09-06-2008 09:14 AM

Try copying it to an external drive since your hard drive is bad. If your system doesn't boot, boot up with a rescue disk. You can use the "cp" command to copy a file. That's what it is for.

Also look for a file in the same location with an ~ at the end. Also look for hidden files. A word processor or editor will often create a temporary copy of the original incase something bad happens to the original or the program crashes.

Chris106 09-06-2008 10:11 AM

Thank for your input. I am getting another hard drive to retrieve my past files. Right now I need to retrieve a more recent file and I see it in a temp file but am unable to open it.

jschiwal 09-08-2008 09:48 PM

What is the name of the file and where is it. If it starts with a hyphen that can be tricky.

You need to end options with double hyphens and then use the file name in the first argument:
cp -a -- '-tempfile' /mnt/destdir/.

Do you have read access to the directory. You will need both 'r' and 'x' permissions on the directory. The 'x' bit lets you enter the directory.


All times are GMT -5. The time now is 03:17 PM.