Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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 06:54 PM.
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
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.