Query the number of digits in a Linux System

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.