![AppImage 파일을 일반 실행 파일과 구별하는 방법은 무엇입니까?](https://linux55.com/image/186977/AppImage%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EC%9D%BC%EB%B0%98%20%EC%8B%A4%ED%96%89%20%ED%8C%8C%EC%9D%BC%EA%B3%BC%20%EA%B5%AC%EB%B3%84%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
문제는 거의 제목에 있습니다. file
AppImage에서 명령을 실행 하면 다음 과 같은 결과가 나타납니다.
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.18, stripped
일반 실행 파일에서는 다음을 얻습니다.
ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=b6e2c0d6aaa2a3cb1555e8e7511e67424eb9ebeb, stripped
명령의 출력을 보고 첫 번째 파일을 AppImage로 식별할 수 있습니까 file
? 이를 달성하기 위해 사용해야 하는 다른 명령이 있습니까?
답변1
magic number
도구를 사용하여 파일 내용을 검사 할 수 있습니다 xxd
. AppImage의 경우 숫자는 입니다 0x414902
.
xxd ucdmap.appimage-0.2.0-x86_64.AppImage| head -1
00000000: 7f45 4c46 0201 0100 4149 0200 0000 0000 .ELF....AI......