Re: [uml-user] Resizing ext3 root_fs

2005-03-17 Thread Blaisorblade
On Tuesday 15 March 2005 21:37, Nuutti Kotivuori wrote: > Nelson Castillo wrote: > > Well, this is silly. If you use dd to truncate a file this way you > > lose the trailing byte :) > > > > I really want to know : Is there another way to truncate a file in > > Linux? > > > > This would be a silly w

Re: [uml-user] Resizing ext3 root_fs

2005-03-15 Thread Nelson Castillo
> > Well, this is silly. If you use dd to truncate a file this way you > > lose the trailing byte :) dd if=/dev/zero of=x seek=newsize bs=1 count=0 I just noticed you can use count=0 to avoid the extra byte. So, this seems to be the easiest way to truncate a file in Linux. > I use trivial program

Re: [uml-user] Resizing ext3 root_fs

2005-03-15 Thread Nuutti Kotivuori
Nelson Castillo wrote: > Well, this is silly. If you use dd to truncate a file this way you > lose the trailing byte :) > > I really want to know : Is there another way to truncate a file in > Linux? > > This would be a silly way to avoid wasting a byte to truncate a file > to have 2 bytes with dd.

Re: [uml-user] Resizing ext3 root_fs

2005-03-15 Thread Nelson Castillo
Well, this is silly. If you use dd to truncate a file this way you lose the trailing byte :) I really want to know : Is there another way to truncate a file in Linux? This would be a silly way to avoid wasting a byte to truncate a file to have 2 bytes with dd. ~$ echo 12345 > x ~$ dd if=x skip=1

Re: [uml-user] Resizing ext3 root_fs

2005-03-15 Thread Nelson Castillo
On Tue, 15 Mar 2005 18:14:06 +0100, Blaisorblade <[EMAIL PROTECTED]> wrote: > On Tuesday 15 March 2005 16:17, itamar wrote: > > How to resize a ext3 root_fs ? > > > > e2fsck -j ext3 filename > > > > dd if=/dev/zero of=filename bs=1 count=1 seek=newsize conv=notrunc > > > > resize2fs -p filename > >

Re: [uml-user] Resizing ext3 root_fs

2005-03-15 Thread Blaisorblade
On Tuesday 15 March 2005 16:17, itamar wrote: > How to resize a ext3 root_fs ? > > e2fsck -j ext3 filename > > dd if=/dev/zero of=filename bs=1 count=1 seek=newsize conv=notrunc > > resize2fs -p filename > > e2fsck -j ext3 filename > > this works ? IIRC it works well, I just don't remember whether

Re: [uml-user] Resizing ext3 root_fs

2005-03-15 Thread Nelson Castillo
On Tue, 15 Mar 2005 12:17:54 -0300, itamar <[EMAIL PROTECTED]> wrote: > How to resize a ext3 root_fs ? Well, let's see an example. Disclaimer : You're on your own. ~$ dd if=/dev/zero of=test.fs bs=1M count=100 100+0 records in 100+0 records out 104857600 bytes transferred in 0.162605 seconds (644

[uml-user] Resizing ext3 root_fs

2005-03-15 Thread itamar
How to resize a ext3 root_fs ? e2fsck -j ext3 filename dd if=/dev/zero of=filename bs=1 count=1 seek=newsize conv=notrunc resize2fs -p filename e2fsck -j ext3 filename this works ? Itamar Reis Peixoto +55 (34) 3238 3845 e-mail : [EMAIL PROTECTED] http://vps.ispbrasil.com.br --