0

The output of file /bin/cp is :

/bin/cp: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=ea4510e2ea94e09894383430c178b21df065faac, stripped

what does it mean ?

2
  • 2
    Have you started by reading the manual page for file , to understand its basic function and output? Mar 4, 2017 at 14:09
  • 2
    That's the copy command used to copy files in Linux, and file /bin/cp is used to describe the file type. Run man file in terminal to see what file command does. Mar 4, 2017 at 14:12

1 Answer 1

3

Let's take it apart piece by piece:

  • /bin/cp name of the program you're passing to file command. In this case , it is cp, the program for coppying files and folders.
  • ELF 64-bit LSB shared object: an external program can use this program's functionality. See my related question Executables vs Shared objects
  • x86-64 - compiled for 64-bit OS
  • version 1 (SYSV) - uses Unix System V standard for ABI. See Linux file command: what does SYSV imply?
  • dynamically linked - uses functionality of other programs/libraries. See kos's answer on my question.(Link #1)
  • interpreter /lib64/ld-linux-x86-64.so.2 - this is the program that will load the executable and all the libraries necessary for the program to work. See PatchELF for simple explanation in the first pargraph. See also Dynamic Linker on Wikipedia
  • for GNU/Linux 2.6.32 - the glibc library used to compile that program was targeted at Linux kernel 2.6.32. See linux command “file” shows “for GNU/Linux 2.6.24”

  • BuildID[sha1]=ea4510e2ea94e09894383430c178b21df065faac - sha1 hashsum for the build session, most useful for developers to debug their program and see which particular version of their code was used. See What does BuildID SHA1 mean?

  • stripped - contains no debugging information. See What are stripped and not-stripped executables in Unix?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.