我想检查文件夹的大小pg_backup
,所以我使用了以下命令:
[postgres@server02 ~]$ pwd
/var/lib/pgsql
[postgres@server02 ~]$ ls -lh
total 4.0K
drwxr-x---. 7 postgres postgres 86 Oct 6 22:00 pg_backup
Run Code Online (Sandbox Code Playgroud)
如上面的输出所示,大小为 86 字节。
但是,pg_backup
目录本身还包含其他几个目录:
[postgres@server02 ~]$ ls -lh pg_backup
total 0
drwxr-xr-x. 3 postgres postgres 121 Oct 2 23:00 20211002
drwxr-xr-x. 2 postgres postgres 109 Oct 3 22:00 20211003
drwxr-xr-x. 2 postgres postgres 109 Oct 4 22:00 20211004
drwxr-xr-x. 2 postgres postgres 109 Oct 5 22:00 20211005
drwxr-xr-x. 2 postgres postgres 109 Oct 6 22:00 20211006 …
Run Code Online (Sandbox Code Playgroud)