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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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:
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
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
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:
ls "/mnt/sdg1/Documents and Settings/Kiley/My Documents/My Pictures"
# You should see some files, otherwise you got the path wrong
# 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:
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.