본문 바로가기

리눅스-기초명령어/파일 시스템 관리

touch, file

 

touch

파일의 시간을 변경하는 명령어, 일반적으로 빈 파일을 생성할 때 사용

 

사용법

touch [Option] [FileName]

 

예시

  • 기본 : 빈 파일을 만든다
[root@rocky1 Documents]# touch NewPad
#일반 파일 생성
[root@rocky1 Documents]# touch Pad.txt

#텍스트 파일 생성
[root@rocky1 Documents]# ll
total 0
-rw-r--r--. 1 root root 0 May 30 12:14 NewPad
-rw-r--r--. 1 root root 0 May 30 12:14 Pad.txt

 

 

file

파일의 타입을 알려주는 명령어

 

사용법

file [Option] [FileName]

 

예시

[root@Linux ~]# file anaconda-ks.cfg
anaconda-ks.cfg: ASCII text

 

'리눅스-기초명령어 > 파일 시스템 관리' 카테고리의 다른 글

ln  (0) 2023.08.31
rm  (2) 2023.08.31
mv  (1) 2023.08.31
CP  (0) 2023.08.31
mkdir  (0) 2023.08.31