LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2009, 07:14 PM   #1
hueyac
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
Copy digital photos from a corrupt HDD


Hello All,

I am a brand new user of Puppy Linux. I am trying to recover digital photos from my Active Duty Military daughter's corrupt HD. I have stumbled through many hours of trying and have made a little progress. I can mount the HDD, an 8GB SanDisk flash drive. I can isolate the photos and view them, I can drag and drop them to Clip Art in Puppy Linux, but I cannot drag and drop them to my mounted flash drive. Going to Clip Art I get an option to copy or move. Going to my flash drive I get no option, nor does it copy. I have tried to use the cp command unsuccessfully. I get an error message that the file cannot be found, however I am looking at it. I use the cp command by right clicking on the file window, selecting the terminal option and typing a cp command. Any idea what I am doing wrong that I cannot drag and drop? Can someone give me the exact cp command protocol to copy a file named Florida, or can I copy the entire directory "My Pictures" from a corrupt XP HDD. Any help will be greatly appreciated as I don't want to keep messing with the corrupt drive for fear of losing what I have.

Thanks,

Chuck
 
Old 08-12-2009, 07:41 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Welcome hueyac,

I would first start by coping the files to your desktop. Then I would try and copy them to your flash drive.

now are you just typing in
Code:
cp florida
if so it may be that you are not in the directory where that file or folder exists.

try doing the following
Code:
cp /path/to/florida/florida.jpg
This is of course assuming that the florida file is a jpg. Change the extension to what ever it might be.


Oh and one more thing. When you copy them to the desktop try and open one up in say gimp or inkscape or even open office drawing just to see if it will open up.
 
Old 08-12-2009, 07:49 PM   #3
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
If you are doing copies from the desktop, make sure to use 'copy' rather than 'move' so that it doesn't have to change the corrupt disk (and potentially make matters worse). If the disk is corrupt and the photos are important to you, it is worth getting someone "who is skilled in the art" to do the transfer, recovery of files is not always easy.

When you use 'cp' from a terminal, you need to know where you are copying from and to. A complete copy command (copying from a flash drive to the desktop) might be:

Code:
cp -r "/mnt/sda1/Documents and Settings/user/My Documents/My Pictures" /home/huey/Desktop
sda1 is the mount point of the flash drive (I am only guessing this; try 'ls /mnt' and 'ls /media' to examine typical mount locations)
user is the name of the user on the XP drive
huey is the name of the user on the Puppy linux
the quotes are important because of the spaces in the Windows path
and the '-r' means recursive, which copies everything inside that folder as well

You can simplify the copy command a little (by making use of the current directory that the terminal is in), but I won't get into that detail here).

Last edited by neonsignal; 08-12-2009 at 07:54 PM.
 
Old 08-12-2009, 08:18 PM   #4
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
one more thing. If the disk is not bad, look into using the dd command. This will do a full low level copy and will pretty much be your backup so you don't have to worry about the hdd crashing totally.

an example could be
Code:
dd if=/dev/sda1 of=/home/myuser/hddbkup/ bs=1024
this depends on if you have a folder called hddbkup and a user called myuser. But I think you get the point. Also be careful as dd can be destructive. to view what your device name is use
Code:
fdisk -l
this will output helpful information.

Here is an online manual for dd http://linux.die.net/man/1/dd

and here is another example http://wiki.linuxquestions.org/wiki/Some_dd_examples
 
Old 08-12-2009, 08:29 PM   #5
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Try PhotoRec
 
Old 08-13-2009, 07:07 AM   #6
jeromeNP7
Member
 
Registered: Jun 2009
Posts: 101

Rep: Reputation: 19
You might want to try to save the images using the image viewer applications, if it has a "Save As..." option. This will be very time consuming, but it's worth a try if everything else fails.

Linux

Last edited by jeromeNP7; 09-04-2009 at 09:53 PM.
 
Old 08-13-2009, 12:28 PM   #7
hueyac
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Good Morning Again,

Hope I can get some more help. I really appreciate all of you who responded to my dilema. I have tried copying the pictures using the following command: cp -r "mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures" /home/sbd1/desktop

My corrupt HDD in an external USB enclosure is sdg1
My good Windows XP in my HP computer is sbd1

When trying to execute this command I get "no such file or directory". Problem is, I am looking at the file and pathway.

Any assistance in solving this problem will be greatly appreciated.

Thanks,

Chuck
San Diego, CA if anyone is close
 
Old 08-13-2009, 12:52 PM   #8
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 297

Rep: Reputation: 62
Quote:
cp -r "mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures" /home/sbd1/desktop
Assuming /home/sdb1/desktop already exists, try the following
Code:
cp -r /mnt/sdg1/Documents\ and \ Settings/My\ Documents/My\ Pictures  /home/sdb1/desktop
 
Old 08-13-2009, 01:11 PM   #9
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
cp -r "mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures" /home/sbd1/desktop
Whilst this command is almost correct there isn't normally a directory /home/sbd1/desktop unless your username is "sdb1" and remember that linux is case sensitive, so maybe you really mean /home/chuck/Desktop (Please check username (guessed) and capitalisation and remember it for the next bit)

Also you are missing a / at the start of the (absolute) source path.

Try the following:
Code:
ls "/mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures"
# You should see some files, otherwise you got the path wrong

ls /home/chuck/Desktop 
# You should see some files, otherwise you got the path wrong (or there's nothing on your Desktop)


# If that worked OK try
cp -r "/mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures"  /home/chuck/Desktop
If there are many files, your desktop will be a big mess by now (But maybe not as bad as this guy's)

So why don't you create a directory on your Desktop called NewPics (Normally R-click on Desktop -> Create ->New Directory) and copy the files there:
Code:
cp -r "/mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures"  /home/chuck/Desktop/NewPics
 
Old 08-13-2009, 10:14 PM   #10
hueyac
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 0
SUCCESS! SUCCESS! SUCCESS! You all came through and helped me beyond my wildest hopes. I have recovered all the files. Many thanks to all who responded. I couldn't have done it without your help, knowledge and time.

Many Thanks,

Chuck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Photo Recovery for Mac - Undelete Photos from Digital Media lyisk Linux - Hardware 2 07-21-2009 08:14 AM
Toy digital camera photos to ipod via ipodlinux? cal_gundert05 Linux - Newbie 0 01-30-2009 12:49 AM
LXer: How to correct perspective and lens distortion in digital photos LXer Syndicated Linux News 0 06-28-2006 05:03 AM
Get photos from my USB digital camera PinRojas Debian 8 06-21-2005 11:43 AM
How do I burn all of my digital photos frontier1 Linux - General 15 12-20-2003 02:02 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration