commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Avoids cat abuse ;)
There are 7 alternatives - vote for the best!
Easy and direct way to find this out.
Needed a quick way to see if my server distro that I setup years ago was running 32bit or not, since with time I had forgotten.
Note: does not check _hardware_ e.g. /proc/cpuinfo but rather the kernel installed
This command tell you if your hardware is 32 or 64 bits even if you install a 32bits OS on a 64 bits hardware.
If your distro don't support the -q switch, try doing :
grep &>/dev/null '\<lm\>' /proc/cpuinfo && echo 64 bits || echo 32 bits
If you can do better, submit your command here.
You must be signed in to comment.