[Fwd: Re: cp brings unknown file type]
Erik Bågfors
zindar at gmail.com
Tue Dec 21 09:06:15 UTC 2004
On Tue, 21 Dec 2004 06:58:18 +0000, Sean Miller <sean at seanmiller.net> wrote:
> 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....
Ehh, what strange unix are you using? I have no problems working with
files with spaces, just remember to put quotes around 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
And here is another
$ cd /media/cdrom0
$ tar cf - . | (cd /home/mdl/fromBackup; tar xvf -)
Same thing but no temp directories.
/Erik
More information about the ubuntu-users
mailing list