COMMAND LINE KUNG FU

Lệnh liệt kê file trong thư mục

722
author Bùi Tấn Việt - 2022-07-11 12:00:10 (GMT+7)

Lệnh ls liệt kê tất cả file trong thư mục.

bash (root)
ls -al
Kết quả
[root@free02 ~]# ls -al /usr/local/
total 92
drwxr-xr-x. 22 root     root     4096 Jun 14 16:38 .
drwxr-xr-x. 15 root     root     4096 Jun  9 10:20 ..
drwxr-xr-x.  2 root     root     4096 Jul  5 10:56 bin
drwxr-xr-x.  2 root     root     4096 Apr 11  2018 etc
drwxr-xr-x.  3 root     root     4096 Jul  5 10:56 include
drwxr-xr-x.  6 root     root     4096 Jul  5 10:56 lib
drwxr-xr-x.  5 root     root     4096 Jun  9 14:18 lib64
drwxr-xr-x.  2 root     root     4096 Apr 11  2018 libexec
-rw-r--r--   1 root     root     1065 Jul 28  2020 LICENSE
drwxr-xr-x   3 root     root     4096 Jun  9 10:44 man
dr-x--x--x   2 apache   apache   4096 Jun  9 10:47 safe-bin
drwxr-xr-x.  2 root     root     4096 Apr 11  2018 sbin
drwxr-xr-x.  7 root     root     4096 Jul  5 10:56 share
drwxr-xr-x.  8 root     root     4096 Jul  5 10:52 src
drwxr-xr-x   4 root     wheel    4096 Apr 16  2006 sysbk

Giải thích

  • ls: Lệnh liệt kê nội dung trong một thư mục
  • Đối số -a: Hiển thị luôn cả file ẩn, các file/ thư mục bắt đầu bởi dấu chấm .
  • Đối số -l: Hiển thị nội dung theo dòng, giúp đễ nhìn hơn.
  • /usr/local/: Thư mục cần liệt kê nội dung.

Bạn có làm được theo hướng dẫn này không?

Lệnh liên quan

Object Storage

Chuẩn S3, không giới hạn băng thông

Object Storage
Thông tin tác giả
Bùi Tấn Việt

Co-Founder & CEO at 123HOST

Bình luận

Tính năng đang được phát triển

Đang tải bình luận
Liên hệ chúng tôi