What does the output of file "/bin/cp" mean
6,669
Let's take it apart piece by piece:
-
/bin/cp
name of the program you're passing tofile
command. In this case , it iscp
, 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
- theglibc
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?
Related videos on Youtube
Author by
bel
Updated on September 18, 2022Comments
-
bel almost 2 years
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 ?
-
user4556274 over 7 yearsHave you started by reading the manual page for
file
, to understand its basic function and output? -
George Udosen over 7 yearsThat's the
copy command
used to copy files in Linux, andfile /bin/cp
is used to describe the file type. Runman file
in terminal to see whatfile
command does.
-