Jim Meyering <[EMAIL PROTECTED]> writes:

> If you don't mind truncating first, how about this?
>
>     true > /var/spool/whatever/foo
>     dd bs=1 seek=2G of=/var/spool/whatever/foo < /dev/null

Also, the latter command works even if the former command is omitted.
That is, by itself, that invocation of dd resizes
/var/spool/whatever/foo to 2 GiB, discarding or extending the file as
needed, which is what the original request asked for.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to