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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-09-2008, 07:11 PM
|
#1
|
|
LQ Newbie
Registered: May 2008
Location: Seattle
Distribution: RH8
Posts: 3
Rep:
|
Why cannot copy from mnt/cdron to my RH8 dir?
Trying to copy a jpg and gif file from a CD-Rom to my RH8 directory.
This is what I'm doing from the target directory:
# cp -a /mnt/cdrom/* ../
# cp -S /mnt/cdrom/* ../
The system prompts
cp: overwrite '../files'?
I choose yes, but the files are not in the destination directory.
Am I missing something, here? 
|
|
|
|
05-09-2008, 07:51 PM
|
#2
|
|
Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
So you want to copy stuff FROM the /mnt/cdrom folder, TO... Where? To the root area? How about to 'destination_folder"
Try this:
cp -ruPv /mnt/cdrom/* /destination_folder
-r = recursive
-u = copy the file only if it doesn't exist or is older than the source.
-P = create target folder if it doesn't exist.
-v = verbose, so you can see what's happening.
PS - Read the man page for 'cp' to verify my options! No warranty is implied or expressed
The way you have the destination folder listed as "../" means "go up one directory", or in other words, you are telling it to copy from /mnt/cdrom TO /mnt
/ = root
./ = right here (current folder)
../ = up one directory
SVA
|
|
|
|
05-09-2008, 07:52 PM
|
#3
|
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, Gentoo
Posts: 252
Rep:
|
For starters, if you only want to copy a .jpg and .gif file from the cd, you should explicitly list the files you want to copy. Example:
Code:
cp /mnt/cdrom/name_of_file.jpg ../
cp /mnt/cdrom/name_of_file.gif ../
For this application of cp, unless you are trying to preserve the original permission on the file (which won't have write capabilites because it is coming off of a cdrom), you don't need the -a option.
It would be helpful for us trying to help you if
1. We knew what directory you were in so we know where you are copying to, ../ is relative to whatever directory you are currently in. or
2. You used the full path as the destination.
|
|
|
|
05-09-2008, 07:56 PM
|
#4
|
|
Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
@ jonlake -- good point 
For just 2 files, why not just copy them each by name. lol.
|
|
|
|
05-12-2008, 07:20 PM
|
#5
|
|
LQ Newbie
Registered: May 2008
Location: Seattle
Distribution: RH8
Posts: 3
Original Poster
Rep:
|
Thank you, here's what worked
Thank you for your help, senior linux penguins  !
Here's what worked:
# cp /mnt/cdrom/filename.jpg /var/www/html/filename.jpg
Copying one file at a time. Also, it was necessary to name the file in both the source and destination addresses. Failing that, the file seemed to be there, but not visible. What i mean is, i got the message "overwrite 'filename.jpg'". Then i would answer yes, and then see no file in the 'll' listing. So, copy twice and name it in both source and destination addresses. Perhaps that's a "duh" for y'all. 
|
|
|
|
06-05-2008, 04:39 PM
|
#6
|
|
LQ Newbie
Registered: May 2008
Location: Seattle
Distribution: RH8
Posts: 3
Original Poster
Rep:
|
Thank you GrapefruiTgirl and jonlake. Copying has been going well, until today.
Problem: Linux RH8 is not recognizing file on CD Roms.
(1) When I copy the response is
cp: 'cannot stat /mnt/cdrom/9999jpg.jpg': no such file or directory
(2) The CDRom is mounted well. A different CDRom used previously mounts and copies fine.
# mount /mnt/cdrom/
# ll /mnt/cdrom/
0
# ls /mnt/cdrom/
# i.e. ll and ls show no files present on the mounted CDRom.
(3) I am using an Ativa CD-R. Copying and writing to the CD from Windows XP. This worked previously.
I'm stumped. CP --help offers nothing new. Suggestions?
|
|
|
|
06-05-2008, 04:54 PM
|
#7
|
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, Gentoo
Posts: 252
Rep:
|
Type in mount from the command line and make sure your cdrom is in fact mounted. Other than that, check dmesg and see if it tells you anything.
|
|
|
|
06-05-2008, 11:00 PM
|
#8
|
|
Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
Quote:
Originally Posted by mikelancey
Thank you GrapefruiTgirl and jonlake. Copying has been going well, until today.
Problem: Linux RH8 is not recognizing file on CD Roms.
(1) When I copy the response is
cp: 'cannot stat /mnt/cdrom/9999jpg.jpg': no such file or directory
(2) The CDRom is mounted well. A different CDRom used previously mounts and copies fine.
# mount /mnt/cdrom/
# ll /mnt/cdrom/
0
# ls /mnt/cdrom/
# i.e. ll and ls show no files present on the mounted CDRom.
(3) I am using an Ativa CD-R. Copying and writing to the CD from Windows XP. This worked previously.
I'm stumped. CP --help offers nothing new. Suggestions?
|
Note the bold part I highlighted.
I have had the exact same experience way back before I tossed XP out the Window. In fact, I still have a CD-RW here somewhere which shows one particular filesystem if I mount it in Linux, but a different filesystem (and different files) if I stick it into a XP machine.  The files I put on the disc from within XP are invisible in Linux.
Depending on *exactly* how you burned or wrote to the disc from XP can change how the files are seen (or not seen) from Linux. You'll have to do your own research for more info because I don't recall the specifics of what I am trying to explain, but it *may* have to do with A) the file system used from XP; B1) whether the disc is finalized or not B2) if it is multi-session or not.
What *might* help, if you haven't specifically tried this yet, is to blank & format a CD-RW from Linux with the UDF-v1.0.2 file system (or maybe a CD-R but not sure if it works the same; it should.) and use that disc to put stuff from XP onto (it will work like a floppy in both OS's) and then mount it in Linux and CP your files from it. If/when the disc gets full, start over with it (blank & format again).
Let us know how whatever you try next goes.
Sasha
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:41 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|