LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-16-2006, 01:58 AM   #1
wba
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Rep: Reputation: 0
Linux and Windows file extensions


Hi all,

I have a dual boot system : Windows XP and since very recently : Mandriva 2007.

I can see I have a USBstick, and in a console screen I can via /mnt/removable see the directories.

I can't however copy my *.jpg files to my Pictures directory on the Linux system.

Do I have to remove the dot and the Windows file-extensions in order be avble to copy them to Linux ?

Anyone a clue ?

Thank you,

W
 
Old 10-16-2006, 02:25 AM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Quote:
Do I have to remove the dot and the Windows file-extensions in order be avble to copy them to Linux ?
No. A file extension isn't tied to any one operating system - it's just part of the filename.

Now... could you post the command that you're using to copy the files, and any error messages?
 
Old 10-16-2006, 02:26 AM   #3
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
The dot and extension doesn't mean anything for Linux.
If you can't copy files from mounted filesystem to your Pictures directory, you have problems with permissions only.
 
Old 10-16-2006, 02:26 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
What errors do you exactly get?

On Linux you'll need to make sure you're writing it all right: .jpg is not the same as .Jpg nor is that the same as .JPG, like it often is in Windows. Also, how are you trying to copy them off? Have you cd to the directory where the image files are (command: ls to see what's on the current dir)? If you're not on the same directory, you'll need to specify the path to the images, just like in Windows. The wildcard * itself works all right, and file extensions are needed of course (Linux doesn't handle them the same way Windows uses, it's all the same in most cases actually whether or not the file has an extension, but it's part of the filename anyway so you will need it).

Code:
cd /mnt/removable
ls
#(now you should see the filenames - pay attention to how the extension is written: jpg, JPG, Jpg or what.)
cp *.jpg /home/pictures
#(that's the same as "cp ./*jpg /home/pictures/")
If you do the above, what errors do you get (remember to change /mnt/removable and /home/pictures accordingly)?

EDIT:
Quote:
The dot and extension doesn't mean anything for Linux.
If you can't copy files from mounted filesystem to your Pictures directory, you have problems with permissions only.
The dot and extension do mean something for Linux: a filename. If you leave them out, the filename does not match and you're facing an error. To Linux it's all the same if you use an extension or not, but when you refer to a file you'll need to write the name exactly as it is. And being unable to copy stuff over does not mean it's a permissions problem, it can be virtually anything..it is somehow probable it's a permissions problem, but then again, it can be something as simple as a typing error. And if the USB disk can be read (user was able to see the pictures), I find it odd it can't be copied from..

Last edited by b0uncer; 10-16-2006 at 02:30 AM.
 
Old 10-16-2006, 06:20 AM   #5
wba
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the replies received already.

What I wanted to do would be in DOS :

copy c:\docs\pictures\*.jpg d:\docs\pictures

meaning copy all *.jpg files from disk c:, directory docs\pictures to disk d:, directory \docs\pictures

So, that's my problem ...

But cp /mnt/removable/pictures/*.* does not work
 
Old 10-16-2006, 06:26 AM   #6
jimmy512
Member
 
Registered: Oct 2006
Location: London
Distribution: Arch
Posts: 183

Rep: Reputation: 31
Could it possibly be that you are not supplying a location fot the pictures to be copied too.

Code:
cp /mnt/removable/pictures/*.*
will only work if you supply a directory to copy the pictures to...

Code:
cp /mnt/removable/pictures/*.* /home/user/pictures
Or something like that would work. Replace /home/user/pictures with whatever folder you like.
 
Old 10-17-2006, 02:46 AM   #7
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Quote:
Originally Posted by b0uncer
The dot and extension do mean something for Linux: a filename...
I meant they aren't treated as auxilliary and descriptive part, and can't cause a problem.
 
  


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
file extensions?? zaid Linux - General 4 01-17-2006 11:28 PM
Linux File Extensions kompact Linux - Newbie 3 04-18-2005 10:15 AM
Need help with File Extensions Linux nooB 454 Linux - Newbie 3 04-10-2005 06:41 PM
File Extensions!!! rejeK Linux - Software 5 12-20-2004 08:30 PM
File Extensions RpgActioN Slackware 1 09-22-2004 11:20 PM


All times are GMT -5. The time now is 05:20 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