be64toh - Linux
Overview
be64toh converts a big-endian 64-bit unsigned integer to a host-order (little-endian) unsigned integer. It is commonly used in network programming or when working with data retrieved from big-endian systems.
Syntax
be64toh <big-endian-64bit-integer>
The only required argument is the big-endian 64-bit unsigned integer to be converted.
Options/Flags
None
Examples
$ be64toh 0x1234567890abcdef
6442925965997885592
Converts the big-endian 64-bit integer 0x1234567890abcdef
to the host-order integer 6442925965997885592
.
Common Issues
None
Integration
be64toh is often used in conjunction with other commands or tools for network programming or data manipulation tasks. For example:
# Convert a network byte order IP address to host order
ip=$(be64toh $ip_big_endian)
Related Commands
- be32toh: Converts a big-endian 32-bit unsigned integer to host-order.
- htons: Converts a host-order 16-bit unsigned integer to network byte order.
- htonl: Converts a host-order 32-bit unsigned integer to network byte order.