[Fwd: Re: cp brings unknown file type]

Sean Miller sean at seanmiller.net
Tue Dec 21 06:58:18 UTC 2004


Magnus Lawrie wrote:

> cp: `/media/cdrom0/paisley 
> dump/Home at Glasgow/MSc/NPS/NPSintranet/Clipart/icons/misc/film_str.gif' 
> has unknown file type


You know what irritates me about Windows users? They create filenames 
with spaces in them.... I get it at work, when they send me csv files 
and say "please load these" and I have to write scripts to rename them 
before Unix can do anything with them....

Syntax of cp is....
cp <source> [<source>] [<source>] <dest>

Therefore if you do "cp /media/cdrom/paisley dump/...." what you're 
actually saying is to copy two files, one called paisley and one with a 
filename starting with "dump"... that would certainly be the case if you 
did a single "cp", not sure how "cp -R" works internally, but I would 
not be surprised at all if it did not have something to do with it... 
however, I've tried to reproduce your issue based on this, and have not 
had any luck...

But here's a suggestion...

$ cd /media/cdrom0
$ tar cvf /tmp/cd.tar *
$ cd /home/mdl/fromBackup
$ tar xvf /tmp/cd.tar
$ rm /tmp/cd.tar

??

Sean




More information about the ubuntu-users mailing list