When querying the number of digits in a Linux system, we often encounter the need to query the number of digits in a linux system. The following are two methods that I usually judge for reference only. 1. check whether there is a/lib64 directory. The 64-bit system has two directories:/lib64 and/lib. the 32-bit system only has/lib 1...
Query the number of digits in a Linux system
We often encounter situations where we need to query the number of digits in the linux system. The following are two methods that I usually judge for reference only.
1. check whether there is a/lib64 directory. The 64-bit system has two directories:/lib64 and/lib. the 32-bit system has only one directory.
2. query system parameter: getconf LONG_BIT
(In 32-bit systems, the int and long types are generally 4 bytes. in 64-bit systems, the int type is 4 bytes, however, long has been changed to 8 bytes. in inux systems, "getconf WORD_BIT" and "getconf LONG_BIT" can be used to obtain the number of digits of word and long. In a 64-bit system, the values are 32 and 64 respectively .)
Author "flying"