Date: Tue, 23 Oct 2007 11:31:35 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: freebsd-questions@freebsd.org, juri_mian@yahoo.com, b.movaqar@adempiere.org Subject: Re: oflag option in GNU dd - equivalent in FreeBSD dd ? Message-ID: <20071023163135.GA74788@dan.emsphone.com> In-Reply-To: <200710231516.l9NFGSVL038402@lurza.secnetix.de> References: <20071023164246.13be9d63@attila> <200710231516.l9NFGSVL038402@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 23), Oliver Fromme said: > Bahman M. <b.movaqar@adempiere.org> wrote: > > On 2007-10-22 Juri Mianovich wrote: > > > I am used to using this command in Linux, using GNU > > > dd: > > > > > > dd if=/blah of=/bleh oflag=append conv=notrunc > > > > > > The problem is, FreeBSD 'dd' does not understand the > > > "oflag" argument. > > > > > > Is there some equivalent in the FreeBSD 'dd' syntax > > > that I can use, or am I forced to install GNU utils ? > > Of course, the easiest way is to do this: > > $ dd if=/blah >> /bleh > > If you cannot do that, please explain why. If you know > your reason, there might be an alternative way to do it. > > > dd if=/blah of=/bleh conv=notrunc seek=`ls -s /bleh | cut -f1 -d ' ' -` > > > > I don't know if any simpler way is possible (anyone?). > > $ dd if=/blah of=/bleh conv=notrunc seek=$(stat -f%z /bleh) I don't think that will work, since seek's argument is in blocks. Even if you divide by 512 (or whatever you decide to set bs=), if the file you're appending do isn't a multiple of the blocksize, you'll end up chopping part of the end off. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071023163135.GA74788>