Re: Bug#467376: coreutils: Wish there was a version of dd with multiple output files

2008-02-25 Thread Jim Meyering
Russell Coker <[EMAIL PROTECTED]> wrote: > Package: coreutils > Version: 5.97-5.3 > Severity: wishlist > > When setting up test environments (chroots and Xen domains) I often want to > duplicate one block device or large file to several others. > > If I am creating three copies I don't want to read

Fix test failure where rm would appear to succeed incorrectly.

2008-02-25 Thread Bob Proulx
I have been seeing the rm fail-eperm test sporadically fail. It turns out that there is a race. The test is opportunistically looking for files that it can't remove so as to provide a test for that part of rm's functionality. But between the time it finds a candidate file and the time it tries t

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Pádraig Brady
Jim Meyering wrote: > Russell Coker <[EMAIL PROTECTED]> wrote: >> If I have a file that is 2G in size but wish to discard the last 1G of data >> then there seems to be no program available to do this. >> >> I think it would be ideal to have a program as part of coreutils that allows >> you to resiz

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Jim Meyering
Russell Coker <[EMAIL PROTECTED]> wrote: > On Monday 25 February 2008 21:29, Pádraig Brady <[EMAIL PROTECTED]> wrote: >> Russell if you want to push code to me it's fine, >> but I was going to work on this tool anyway. > > I don't have any code (yet). If you are going to work on it then I would be

Re: argve0, psfool

2008-02-25 Thread Pádraig Brady
Andreas Schwab wrote: > Andreas Schwab <[EMAIL PROTECTED]> writes: > >> Brian Dessent <[EMAIL PROTECTED]> writes: >> >>> "Daniel C. Bastos" wrote: >>> I always miss these two programs on every system I meet. argv0 is very handy when dealing with programs that care about argv[0] and psfoo

Re: argve0, psfool

2008-02-25 Thread Andreas Schwab
Pádraig Brady <[EMAIL PROTECTED]> writes: > Andreas Schwab wrote: >> That should of course be: >> >> bash -c 'exec -a "$0" "$@"' fake real arg1 arg2 > > I think that should be? > > bash -c 'exec -a "$@"' fake real arg1 arg2 No, $0 expands to fake and "$*" expands to "real arg1 arg2". Andreas.

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Jim Meyering
Russell Coker <[EMAIL PROTECTED]> wrote: > On Monday 25 February 2008 22:11, Jim Meyering <[EMAIL PROTECTED]> wrote: >> > One non-obvious feature request that I have is for a truncate on a >> > non-existant file to create it (similar to the way "touch" is commonly >> > used to create files). >> >>

Re: Fix test failure where rm would appear to succeed incorrectly.

2008-02-25 Thread Jim Meyering
[EMAIL PROTECTED] (Bob Proulx) wrote: > I have been seeing the rm fail-eperm test sporadically fail. It turns > out that there is a race. The test is opportunistically looking for > files that it can't remove so as to provide a test for that part of > rm's functionality. But between the time it

Re: Fix test failure where rm would appear to succeed incorrectly.

2008-02-25 Thread Bob Proulx
Jim Meyering wrote: > Bob Proulx wrote: > > git fetch --no-tags git://git.proulx.com/idutils > > rm-fail-eperm-fix:rm-fail-eperm-fix > > Thanks for tracking that down and fixing it. > I applied your patch. (though, fyi, the fetch failed) I crossed the streams! That should have been: s/idu

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Paul Eggert
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 invocat

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Russell Coker
On Monday 25 February 2008 21:29, Pádraig Brady <[EMAIL PROTECTED]> wrote: > Russell if you want to push code to me it's fine, > but I was going to work on this tool anyway. I don't have any code (yet). If you are going to work on it then I would be more than happy to leave it to you. I would b

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Russell Coker
On Monday 25 February 2008 22:11, Jim Meyering <[EMAIL PROTECTED]> wrote: > > One non-obvious feature request that I have is for a truncate on a > > non-existant file to create it (similar to the way "touch" is commonly > > used to create files). > > The obvious question is then "Why?" One specifi

Re: Bug#467378: coreutils: Please include a program to truncate files

2008-02-25 Thread Russell Coker
On Tuesday 26 February 2008 10:08, Paul Eggert <[EMAIL PROTECTED]> wrote: > > 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,