看看文件大小的常用方式
1. stat
[xiaodong@localhost ~]$ stat README
File: ‘README’
Size: 41290 Blocks: 88 IO Block: 4096 regular file
Device: 803h/2051d Inode: 51523817 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/xiaodong) Gid: ( 1000/xiaodong)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2022-03-03 21:52:58.193483637 -0800
Modify: 2022-03-03 21:52:55.167465012 -0800
Change: 2022-03-03 21:52:55.169465025 -0800
Birth: -
2. du -lh
[xiaodong@localhost ~]$ du -lh README
44K README
3. ls -l <==>ll
权限文件,文件大小,最后修改时间
[xiaodong@localhost ~]$ ls -l
total 44
drwxr-xr-x. 2 xiaodong xiaodong 6 Mar 3 21:41 Desktop
-rw-rw-r--. 1 xiaodong xiaodong 41290 Mar 3 21:52 README
4. wc
[xiaodong@localhost ~]$ wc README
49'行号' 837'单词数量' 41281'字节数量' README
5. 查看当前目录下所有文件和文件夹的大小
# 每个平台上的命令不是很统一,下面这个命令是通用的
du -sh ./*
# -d 的是目录深度 depth
du -h -d 1