What does BuildID SHA1 mean?(中文翻译失去灵魂)

I was exploring around in the ubuntu unity terminal window when this came up:

When I typed:

file /bin/ls
the output is:

/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x214a38d0db472db559f0dabf0ae97f82fea83e03, stripped
I wanted to verify that the sha1 is correct and hence I typed this:

openssl sha1 /bin/ls
However, the output is as such:

SHA1(/bin/ls)= 8800fee57584ed1c44b638225c2f1eec818a27c2
While they are of the same length in hexadecimal, they don’t seem to match. Did I miss something? Or does the BuildID[sha1] refer to something else?

Answer:
Or does the BuildID[sha1] refer to something else?

BuildID is NOT the hash of a binary or related to it. It is an identifier for the “build” (or compiling) session which produced that binary. It is mostly there for debug purposes, so that the developers can look at the logs, environment, etc. from session number $BuildID and try to fix the problem, reproduce it, etc.

BTW, SHA1 hashes of anything are always 160 bits long 😃

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值