bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cut -b gives bogus results on large files


From: Daniel Janus
Subject: cut -b gives bogus results on large files
Date: Mon, 9 Feb 2009 09:18:33 +0100
User-agent: Mutt/1.5.9i

Hello,

I get the following on Ubuntu 8.04.2 on x86, both with system coreutils (6.10)
and hand-compiled coreutils 6.12 (unfortunately, I am not able to
compile coreutils from git to check it against current mainline):

   ~/coreutils/coreutils-6.12/src$ ./dd if=/dev/urandom of=test bs=1M count=200
   200+0 records in
   200+0 records out
   209715200 bytes (210 MB) copied, 33.4646 s, 6.3 MB/s

   ~/coreutils/coreutils-6.12/src$ ls -l test
   -rwxr-xr-x 1 djanus djanus 209715200 Feb  9 09:12 test

   ~/coreutils/coreutils-6.12/src$ ./cut -b 1-200 <test >out

   ~/coreutils/coreutils-6.12/src$ ls -l out
   -rw-r--r-- 1 djanus djanus 114189372 Feb  9 09:13 out

   ~/coreutils/coreutils-6.12/src$ ./cut --version
   cut (GNU coreutils) 6.12
   Copyright (C) 2008 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later
   <http://gnu.org/licenses/gpl.html>
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.

   Written by David Ihnat, David MacKenzie, and Jim Meyering.

   ~/coreutils/coreutils-6.12/src$ uname -a
   Linux hurricane 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 
GNU/Linux

I would expect the `out' file to be exactly 200 bytes in size
and contain the first 200 bytes of `test'.

What gives?

Best regards,
Daniel Janus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]