Administrators Fernando Mercês Posted September 10, 2017 Administrators Share Posted September 10, 2017 A tarefa não é difícil, mas decidi mostrar como faço. :-) A maneira rápida quando tenho shell: $ file /bin/ls /bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a0823e17cafbe5b2296346216445566840fdfd88, stripped Programaticamente em C (8 bytes significam 64 bits). $ echo 'main(){printf("%d\n", sizeof(void *));}' | tcc -run - 8 Só pra ver se o processador suporta: $ grep --color -w lm /proc/cpuinfo O clássico: $ uname -a Linux linux64 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u3 (2017-08-15) x86_64 GNU/Linux Ou pelo nome dos arquivos do kernel: $ ls /boot config-3.16.0-4-amd64 grub initrd.img-3.16.0-4-amd64 System.map-3.16.0-4-amd64 vmlinuz-3.16.0-4-amd64 Tem outra maneira de fazer? :-) Link to comment Share on other sites More sharing options...
Moderators Leandro Fróes Posted September 11, 2017 Moderators Share Posted September 11, 2017 Boa!! cat /proc/version Link to comment Share on other sites More sharing options...
fredericopissarra Posted February 22, 2019 Share Posted February 22, 2019 Meio tarde, nem me lembrava desse post... mas, eis outra maneira: $ arch []s Fred Link to comment Share on other sites More sharing options...
Administrators Fernando Mercês Posted February 22, 2019 Author Administrators Share Posted February 22, 2019 Anos e anos de Linux e não conhecia nem o /proc/version nem o comando arch. Cada vez me identifico no pensamento socrático... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.