file 명령어의 기능을 한줄로 설명 하면, "그 파일의 종류를 알려주는 명령어" 라고 생각하시면 됩니다
file 명령어 사용법은 아래와 같습니다.
file [옵션] [파일 위치]
file 명령어의 옵션도 몇개 알아보겠습니다.
1. -b : 출력 결과를 간단하게 표시 합니다.
┌──(root㉿kali)-[~/blog/fileTest]
└─# file -b test1
Unicode text, UTF-8 text
┌──(root㉿kali)-[~/blog/fileTest]
└─# file test1
test1: Unicode text, UTF-8 text
2. -N : 한번 읽어본 파일은 다시 읽고 출력 하지 않는다.
┌──(root㉿kali)-[~/blog/fileTest]
└─# file -N test1
test1: Unicode text, UTF-8 text
┌──(root㉿kali)-[~/blog/fileTest]
└─# file -N test1
test1: Unicode text, UTF-8 text
3. -v : 상세한 결과를 알려준다.
┌──(root㉿kali)-[~/blog/fileTest]
└─# file -v test1
file-5.44
magic file from /etc/magic:/usr/share/misc/magic
┌──(root㉿kali)-[~/blog/fileTest]
└─# file test1
test1: Unicode text, UTF-8 text
정리 :
file 명령어는 그 파일의 종류를 설명 해준다.
리다이렉션 (0) | 2023.04.26 |
---|---|
[리눅스 명령어 정리] find 명령어 사용법과 옵션 (0) | 2023.04.26 |
[리눅스 명령어 정리]CD 사용법 (1) | 2023.04.25 |
[리눅스 명령어 정리] CAT,MORE (0) | 2023.04.24 |
[linux 명령어 정리] ls (2) | 2023.04.23 |