Linux顯示單一目錄的資訊


作業系統:Oracle Enterprise Linux

目的:顯示單一目錄的資訊。

當我們在 ls 後方加入目錄名稱時,它會將該目錄內的檔案列表出來。
[root@localhost /]# ls -l home
total 36
drwx------  3 davfs2      501  4096 Apr 15  2010 davfs2
drwx------  2 root          root      16384 Apr  5  2010 lost+found
drwxr-xr-x 43 oracle    oracle     4096 Jun  1 01:20 oracle
drwx------  3 spotlight spotlight  4096 Mar 29 20:22 spotlight
drwx------  3 u078      u078       4096 Mar 12 01:11 u078

此時可以加入參數 -d,就可以了。
[root@localhost /]# ls -ld home
drwxr-xr-x 7 root root 4096 Mar 29 20:10 home

如果想查詢目錄的總容量,可以輸入以下的指令。
[root@localhost /]# du -sh home
5.5G    home

Windows 11安裝時跳過網路連線