This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Byte-order in od -x (Win2K)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Andreas Eibach on 6/28/2005 7:36 AM:
> Well, looks like a feature or a bug. :))

Feature.

> 
> $ ls -hog CD0.dat
> 
> -rw-r--r--  1  0 Jun 28  14:46 CD0.dat
> (minus r; w minus; r minus; minus r; minus minus)
> 
> 
> and now ...
> 
> $ ls -hog CD0.dat | od -x
> 
> 722d 2d77 2d72 722d .... 
> 
> Definitely wrong byte order.

Well, what do you expect on a little-endian machine, when you are passing
characters to od in big-endian order?

> Can that be tweaked somehow?

Yes - try "od --help" to see other display formats.  For example, "od -t
x1" prints hex bytes one at a time, with no endianness issues.  Or try "ls
- -hog | dd conv=swab status=noxfer | od -x", with that dd in the middle
doing a byte-swap.

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

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCwVUz84KuGfSFAYARAj2CAKChJGQyLRGyaxIiwyGTIqcA/cthpgCg0/4S
w5fxo4Tn1ez3ipIVoRbATfE=
=jW4d
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]