반응형

 

일반적 : # ls  -al

파일 크기 보기 쉽게  ~k  식으로 정리 : # ls -alh

최근 수정한 순으로 : # ls -alt

 

 

숨겨진 파일과 디렉토리까지 모두 출력하기

#  ls  -a

localhost:/home#  ls  -a
.             ..            book_office   chat_office   readme.txt    whatsnew.doc

 

 

파일 및 디렉토리의 상세 정보 출력하기

# ls  -l

localhost:/home#  ls  -l
total 8
drwxr-xr-x    2 root     root          4096 Apr 20 03:59 book_office
drwxr-xr-x    2 root     root          4096 Apr 20 03:20 chat_office
-rw-r--r--    1 root     root             0 Apr 20 04:02 readme.txt
-rw-r--r--    1 root     root             0 Apr 20 04:09 whatsnew.doc

 

 

파일 크기를 인간이 이해하기 쉬운 단위로 출력하기

# ls  -lh

localhost:/home#  ls  -lh
total 8K
drwxr-xr-x    2 root     root        4.0K Apr 20 03:59 book_office
drwxr-xr-x    2 root     root        4.0K Apr 20 03:20 chat_office
-rw-r--r--    1 root     root           0 Apr 20 04:02 readme.txt
-rw-r--r--    1 root     root           0 Apr 20 04:09 whatsnew.doc

 

 

파일 및 디렉토리를 수정 일자 순으로 정렬하여 출력하기

# ls  -lt

localhost:/home#  ls  -lt
total 8
-rw-r--r--    1 root     root             0 Apr 20 04:09 whatsnew.doc
-rw-r--r--    1 root     root             0 Apr 20 04:02 readme.txt
drwxr-xr-x    2 root     root          4096 Apr 20 03:59 book_office
drwxr-xr-x    2 root     root          4096 Apr 20 03:20 chat_office

 

 

파일 및 디렉토리를 역순으로 출력하기

#  ls  -r

localhost:/home# ls  -r
whatsnew.doc  readme.txt    chat_office   book_office

 

 

현재 디렉토리부터 하위 디렉토리까지 전부 출력하기

#  ls  -R

localhost:/home# ls  -R
.:
book_office   chat_office   readme.txt    whatsnew.doc

./book_office:

./chat_office:

 

 

파일 및 디렉토리의 inode 번호까지 함께 출력하기

#  ls  -i

localhost:/home#  ls  -i
 262147 book_office    262146 chat_office    262148 readme.txt     262149 whatsnew.doc

 

 

 

파일과 디렉토리를 색으로 구분하여 출력하기

알파일 리눅스 기본  지원

#  ls --color

localhost:/home#  ls --color
book_office   chat_office   readme.txt    whatsnew.doc

 

반응형

'Alpine Linux > 설치, 명령어' 카테고리의 다른 글

repository change : 레포지토리 변경  (0) 2022.08.01
* vi 에디터  (0) 2020.09.07
* 리눅스 hostname 보기  (0) 2020.09.06