[PATCH] Add misc-utils/timeout utility

2008-03-07 Thread Pádraig Brady
Hi Karel, I've attached a patch to add the "timeout" utility which was previously discussed on coreutils and util-linux-ng lists. I've tested this in a lot of situations and have noted the following caveats: If you start a command in the background, which reads from the tty and so is immediately

[PATCH] dd: avoid unnecessary, but harmless close_stdout call.

2008-03-07 Thread Jim Meyering
Ulrich Drepper reported in http://bugzilla.redhat.com/436368 that dd performs an unnecessary "close" syscall. While this double close is obviously harmless in dd (no other thread can open the STDOUT_FILENO file descriptor between the two close calls), it is unnecessary, and the fix is easy:

new coreutils snapshot available

2008-03-07 Thread Jim Meyering
There have been over 50 change-sets since the last one, so... coreutils snapshot: http://meyering.net/cu/coreutils-ss.tar.gz8.9 MB http://meyering.net/cu/coreutils-ss.tar.lzma 3.6 MB http://meyering.net/cu/coreutils-ss.tar.gz.sig http://meyering.net/cu/coreutils-ss.tar.lzma.si

Re: Feature Request: du --dir-with-slash

2008-03-07 Thread Pádraig Brady
Thomas Guettler wrote: > Hi, > > I use "du -ax / | sort -rn > /var/tmp/du-`date --iso`" to get the sorted > total size of all > files and directories. > > Unfortunately you can't see a difference between a directory and a file > in the output. It would be nice if the directories would be added by

Re: Feature Request: du --dir-with-slash

2008-03-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Pádraig Brady on 3/7/2008 8:46 AM: |> Unfortunately you can't see a difference between a directory and a file |> in the output. It would be nice if the directories would be added by a |> slash. | | How about the attaced patch? I don't th

Re: Feature Request: du --dir-with-slash

2008-03-07 Thread Pádraig Brady
Eric Blake wrote: > I don't think you can do it by default - it must be via an option. POSIX > states: > > ~The output from du shall consist of the amount of space allocated to a > file and the name of the file, in the following format: > > ~"%d %s\n", , > > http://www.opengroup.org/on

Re: Feature Request: du --dir-with-slash

2008-03-07 Thread Bauke Jan Douma
Pádraig Brady wrote on 07-03-08 18:01: I think adding a / to all dirs is therefore more consistent as well as providing more info to the user. I understand the need to comply with POSIX where possible, but one needs to use common sense to move forward. POSIX is not the be all and end all. That

Re: Feature Request: du --dir-with-slash

2008-03-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Pádraig Brady on 3/7/2008 10:01 AM: | | So does that mean we should be stripping trailing / | from directories that are specified? | | $ du -s /tmp | 8040/tmp | | I think adding a / to all dirs is therefore more consistent | a

1 FAIL on Mac OS 10.5

2008-03-07 Thread Martin Mueller
Model Name: MacBook Pro 17" Model Identifier: MacBookPro1,2 Processor Name: Intel Core Duo Processor Speed: 2.16 GHz System Version: Mac OS X 10.5.2 (9C31) Kernel Version: Darwin 9.2.0 gcc version 4.0.1 (Apple Inc. build 5465)

tail -1 * has unexpected output

2008-03-07 Thread steve+dated+1205342789 . 4f8983
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey. 'tail -1 *' used to output one line of every file specified. Now, it outputs tail: invalid option -- 1 How to reproduce: create two files: z.1, z.2 containing one line each (aka, this is z.1, this is z.2), then: (14) [EMAIL PROTECTED] Fri

Re: tail -1 * has unexpected output

2008-03-07 Thread Bob Proulx
[EMAIL PROTECTED] wrote: > tail: invalid option -- 1 What version of tail are you using? tail --version If it is older than 5.90 please upgrade. Your report implies that you are probably running 5.2.1 from 2004. This behavior was changed in coreutils 5.90 in 2005. The current stable release