od command

2005-11-18 Thread Vance, Jack D.
Hello - can you please tell me what the numeric value is in the following 
output?
"000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
1415102464".
 
The command used was "od -Ad -tx1" run on a wiped 10.0GB hard drive with 
10,005,037,056 bytes.
 
 
Thank you,
Jack Vance
FBI
Forensic Support Unit
(703) 632-2938
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: od command

2005-11-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

FYI - the bug-textutils mailing list has moved to bug-coreutils; if you
got the old address from the output of 'od --help', then you probably
should upgrade your coreutils installation.

According to Vance, Jack D. on 11/18/2005 10:12 AM:
> Hello - can you please tell me what the numeric value is in the following 
> output?
> "000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> *
> 1415102464".
>  
> The command used was "od -Ad -tx1" run on a wiped 10.0GB hard drive with 
> 10,005,037,056 bytes.

"info od" may be helpful here.  The output is telling you that the first
file offset at octal 000 consisted of all 00 bytes, then a * meaning
identical lines, up until offset octal 1415102464 at EOF.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDfiJu84KuGfSFAYARAp4hAJ0ZosNIREU5mTXVlyi/qTgs1K2ktACeMaQb
UjIRMgfvrQwpQAkElQsoJZw=
=rJ3L
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: od command

2005-11-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In general, it is good to keep replies on the mailing list, so that they
will appear in archives for future reference.  Adding bug-coreutils back
to distribution.

According to Vance, Jack D. on 11/18/2005 1:49 PM:
> I almost understand except 000 and 1415102464 are decimal values not 
> octal, because of the "-Ad" command option. Right?  I don't see the 
> correlation between 1,415,102,464 and 10,005,037,056.

10005037056 modulo 2^32 is 1415102464, in other words, your version of od
used 32-bit math instead of 64-bit math.  Could you please report what 'od
- --version' displays, as well as 'uname -a'?  If yours is not the most
recent version, try upgrading to coreutils 5.93 to see if it has been fixed.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDfkGO84KuGfSFAYARAhWnAJ0fUfu3av3HTY2ZnqUroMxQFMzm0QCfeouk
ndBjssfKRfpe7hoskEb8kJo=
=OpB5
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


RE: od command

2005-11-21 Thread Vance, Jack D.
od - --version = 2.0 written by Jim Meyering.
uname -a = Linux linux 2.4.29-rc1 #1 SMP Tue Jan 11 16:53:32 EST 2005 i686 
unknown unknown GNU/Linux
 
 
Jack

-Original Message- 
From: Eric Blake [mailto:[EMAIL PROTECTED] 
Sent: Fri 11/18/2005 4:03 PM 
To: Vance, Jack D.; bug-coreutils@gnu.org 
Cc: 
Subject: Re: od command



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In general, it is good to keep replies on the mailing list, so that they
will appear in archives for future reference.  Adding bug-coreutils back
to distribution.

According to Vance, Jack D. on 11/18/2005 1:49 PM:
> I almost understand except 000 and 1415102464 are decimal values 
not octal, because of the "-Ad" command option. Right?  I don't see the 
correlation between 1,415,102,464 and 10,005,037,056.

10005037056 modulo 2^32 is 1415102464, in other words, your version of 
od
used 32-bit math instead of 64-bit math.  Could you please report what 
'od
- --version' displays, as well as 'uname -a'?  If yours is not the most
recent version, try upgrading to coreutils 5.93 to see if it has been 
fixed.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDfkGO84KuGfSFAYARAhWnAJ0fUfu3av3HTY2ZnqUroMxQFMzm0QCfeouk
ndBjssfKRfpe7hoskEb8kJo=
=OpB5
-END PGP SIGNATURE-



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: od command

2005-11-22 Thread Paul Eggert
"Vance, Jack D." <[EMAIL PROTECTED]> writes:

> Hello - can you please tell me what the numeric value is in the following 
> output?
> "000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> *
> 1415102464".
>  
> The command used was "od -Ad -tx1" run on a wiped 10.0GB hard drive with 
> 10,005,037,056 bytes.

You're running an old version of 'od', which cannot output offsets
greater than 2*32 bytes; the offsets wrap around.  That bug was fixed
several years ago (in 2000 or 2001 -- I can't recall offhand).
I cannot reproduce the bug with coreutils 5.93 od
:

   518-penguin $ dd if=/dev/null of=big bs=10MiB seek=1024
   0+0 records in
   0+0 records out
   0 bytes (0 B) copied, 0.010626 seconds, 0.0 kB/s
   519-penguin $ ls -l big
   -rw-r--r-- 1 eggert eggert 10737418240 Nov 22 12:49 big
   520-penguin $ od -Ad -tx1 big
   000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   *
   10737418240

I suggest upgrading to the latest version of 'od'.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


bug#17367: od command not working correctly ?

2014-04-29 Thread Dieter Walz
   Hi,
   I've got a problem with od command; could anyone check, please?

   After editing and saving a file ...
   [de139642@oc0027726724 ~]$ cat temp.txt
   a1
   b2
   c3
   ... I wanted to browse it in hex mode by use of 'od' command, however I
   failed
   to obtain a correct image:

   [de139642@oc0027726724 ~]$ od -t x temp.txt
   000 620a3161 33630a32 0a0a
   012
   [de139642@oc0027726724 ~]$ od -t x2 temp.txt
   000 3161 620a 0a32 3363 0a0a
   012
   [de139642@oc0027726724 ~]$ od -x temp.txt
   000 3161 620a 0a32 3363 0a0a
   012
   [de139642@oc0027726724 ~]$
   using vi (hex mode) instead, I got what I expected 
   1: 6131 0a62 320a 6333 0a0a a1.b2.c3..
   Is there an error with od command or do I understand it badly?
   Thanks
   Dieter
   dieter.w...@web.de


bug#17367: od command not working correctly ?

2014-04-29 Thread Pádraig Brady
tag 17367 notabug
close 17367
stop

On 04/29/2014 07:20 AM, Dieter Walz wrote:
>Hi,
>I've got a problem with od command; could anyone check, please?
> 
>After editing and saving a file ...
>[de139642@oc0027726724 ~]$ cat temp.txt
>a1
>b2
>c3
>... I wanted to browse it in hex mode by use of 'od' command, however I
>failed
>to obtain a correct image:
> 
>[de139642@oc0027726724 ~]$ od -t x temp.txt
>000 620a3161 33630a32 0a0a
>012
>[de139642@oc0027726724 ~]$ od -t x2 temp.txt
>000 3161 620a 0a32 3363 0a0a
>012
>[de139642@oc0027726724 ~]$ od -x temp.txt
>000 3161 620a 0a32 3363 0a0a
>012
>[de139642@oc0027726724 ~]$
>using vi (hex mode) instead, I got what I expected 
>    1: 6131 0a62 320a 6333 0a0a a1.b2.c3..
>Is there an error with od command or do I understand it badly?

I added EXAMPLES to the man page a while back,
which might be what you want:

  od -A x -t x1z -v
Display hexdump format output

I notice the vi hex mode is using big endian 2 byte format.
If you do want that, you can get with the version of od in git like:

  $ od --endian=big -Ax -t x2z -v temp.txt
00 6131 0a62 320a 6333 0a00 >a1.b2.c3.<

Pádraig.





bug#10045: Unix od command, reverses hex bytes in output

2011-11-14 Thread ADAdamo
On Red Hat, the od command reverses the hex bytes.
[lrxdusr@cdtslrx122d PatientLoadDataFiles]$ cat a
123456
[lrxdusr@cdtslrx122d PatientLoadDataFiles]$ od -cx a
000   1   2   3   4   5   6  \n  \0
3231 3433 3635 000a

On HP-UX, it prints what you'd expect.
plr02:lrxiusr:/plr02_users/lrxiusr/artdadamo> od -cx a
0003132333435360a00
  1   2   3   4   5   6  \n

Is this a big-endian/little-endian issue?

Thanks,

Arthur D'Adamo
200 Campus Drive
Collegeville, PA 19426
Of: 610-244-2296
Cl: 215-872-5925



bug#10045: Unix od command, reverses hex bytes in output

2011-11-14 Thread Eric Blake
tag 10045 notabug
thanks

On 11/14/2011 07:56 AM, adad...@us.imshealth.com wrote:
> On Red Hat, the od command reverses the hex bytes.
> [lrxdusr@cdtslrx122d PatientLoadDataFiles]$ cat a
> 123456
> [lrxdusr@cdtslrx122d PatientLoadDataFiles]$ od -cx a
> 000   1   2   3   4   5   6  \n  \0
> 3231 3433 3635 000a
> 
> On HP-UX, it prints what you'd expect.
> plr02:lrxiusr:/plr02_users/lrxiusr/artdadamo> od -cx a
> 0003132333435360a00
>   1   2   3   4   5   6  \n
> 
> Is this a big-endian/little-endian issue?

Absolutely, which means it's not a bug, but a requirement by POSIX.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/od.html

If you want to output bytes in hex, then don't use the shorthand '-x'
(which is hardcoded to picking up machine-size short words, as in -tx2,
and thus exposes endianness issues), but instead use an explicit '-tx1'.

I'm closing this report.

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


bug#10045: Unix od command, reverses hex bytes in output

2011-11-14 Thread Bob Proulx
adad...@us.imshealth.com wrote:
> On Red Hat, the od command reverses the hex bytes.
> [lrxdusr@cdtslrx122d PatientLoadDataFiles]$ cat a
> 123456
> [lrxdusr@cdtslrx122d PatientLoadDataFiles]$ od -cx a
> 000   1   2   3   4   5   6  \n  \0
> 3231 3433 3635 000a
> 
> On HP-UX, it prints what you'd expect.
> plr02:lrxiusr:/plr02_users/lrxiusr/artdadamo> od -cx a
> 0003132333435360a00
>   1   2   3   4   5   6  \n
> 
> Is this a big-endian/little-endian issue?

Yes.  And also a misunderstanding of short integers.  Short integers
are two bytes.  With default printing they are printed in the default
endian format of the machine.  You probably wanted 'od -tcx1'.

Please see the FAQ reference for more details:

  The 'od -x' command prints bytes in the wrong order.
  
http://www.gnu.org/software/coreutils/faq/#The-_0027od-_002dx_0027-command-prints-bytes-in-the-wrong-order_002e

Bob