On Fri, 2008-03-28 at 16:45 +0100, Denys Vlasenko wrote:
> On Friday 28 March 2008 16:22, Joakim Tjernlund wrote:
> > 
> > On Fri, 2008-03-28 at 09:44 -0500, Kevin Holland wrote:
> > > You have to use something like 
> > > cat myfile > /dev/mtdblock/1
> > > because you don't have a filesystem mounted to that mtdblock I'm
> > > assuming.  If there is a filesystem you would mount it then copy the
> > > file to the mountpoint.
> > > Kevin
> > 
> > Yeah, I know the cat trick works but so should cp too, I think. Earlier
> > I used GNU cp and that worked like that. Compare with symlinks, cp
> > copies the contents, not the symlink itself(unless -d or -P is given)
> 
> Well, GNU cp also copies TO dest symlink's target too,
> which is incredibly careless. Hell knows where that symlink points -
> /etc/passwd? /dev/sda? Cool, eh?

Very :) But then again perhaps this is the right thing to do. Why
follow the symlink in one direction but not the other?

> 
> Instead of wanting cp to be a mix of copy and cat, why don't you use
> cat when you want to say "please open and read from this file/device/pipe"?
> That would be unambiguous. (Same holds for writing TO things - use >file).

maybe, but then cp should be fixed to not copy the contents of a
symlink?
What about cp myfile /dev/mtdblock1? Currently cp copies the contents of
myfile to the flash.

> 
> As it stands now, cp's code is already a maze of heuristics
> "what user actually wants, dammit?"

Maybe cp should just open and copy? No special handling by default.

 Jocke
> --
> vda
> 
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to