Under any linux system, you want to use the command du. (Disk Usage)

Common usage is :

du -sh file(s) name(s)

or

du -sh /path/to/dir/*

du -sh .

Replace 'h' by 'k','m' or 'g' for Kilobytes, Megabytes and Gigabytes instead of human-readable. With k/m/j switches, you can even pipe the output un sort -n (numeric sort instead of lexicographic) to get the sorted by size list of files in a directory.

If you still have a big difference, you may want to try the --apparent-size switch to du which will allow you to diagnose sparse files. (files with empty space inside, to be simple)

For more information, see the manual page of du

ref:

https://superuser.com/questions/631704/how-to-know-the-directory-size-in-centos

How to know the directory size in CENTOS 查看文件夹大小的更多相关文章

  1. Centos查看文件夹大小

    查看当前目录下文件夹大小 du -h --max-depth=1 查看整体情况 df -h

  2. linux(centos)如何查看文件夹大小

    参考http://zhidao.baidu.com/link?url=OrfDgdHvyA1pSDAy6ql-IgPBWtvcS5AR9bc543zTr1hLIDfCd42nYtNBplAl2pHvM ...

  3. 2017-7-19-每日博客-关于Linux下的CentOS中文件夹基本操作命令.doc

    CentOS中文件夹基本操作命令 文件(夹)查看类命令 ls--显示指定目录下内容 说明:ls 显示结果以不同的颜色来区分文件类别.蓝色代表目录,灰色代表普通文件,绿色代表可执行文件,红色代表压缩文件 ...

  4. [转]Centos系统中查看文件和文件夹大小

    本文转自:https://blog.csdn.net/zgmu/article/details/52882868 当磁盘大小超过标准时会有报警提示,这时如果掌握df和du命令是非常明智的选择.df可以 ...

  5. CentOS下查看文件和文件夹大小

    当磁盘大小超过标准时会有报警提示,这时如果掌握df和du命令是非常明智的选择. df可以查看一级文件夹大小.使用比例.档案系统及其挂入点,但对文件却无能为力. 当磁盘大小超过标准时会有报警提示,这时如 ...

  6. 解决WIN7与虚拟机CentOS的文件夹共享问题

    一.系统与软件 WIN7 64bit.VirtualBox 5.0.14.CentOS 6.5.SecureCRT 7.2.3 二.使用文件夹共享需要安装增强功能,但是安装时无法读取光盘iso文件 三 ...

  7. CentOS中文件夹基本操作命令

    摘自:http://www.centoscn.com/CentOS/help/2013/1024/1967.html 文件(夹)查看类命令 ls--显示指定目录下内容 说明:ls 显示结果以不同的颜色 ...

  8. CentOs查看文件的几种方式

    有许多命令都可以查看文件,不同的命令有不同的优点,可以针对不同的需要分别选择命令以提高效率:   cat     由第一行开始显示内容,并将所有内容输出   tac     从最后一行倒序显示内容,并 ...

  9. centos查看磁盘扇区大小等信息

    fdisk -l 说明一下: “Disk /dev/sda: 53.7 GB, 53687091200 bytes” 表示第一块磁盘的大小为53.7GB. "255 heads"表 ...

随机推荐

  1. Vue系列之 => 组件中的data和methods

    使用data <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...

  2. HDU 1014 Uniform Generator(题解)

    Uniform Generator Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  3. linux 查看python安装路径,版本号

    一.想要查看ubuntu中安装的python路径 方法一:whereis python     方法二:which python   二.想要查看ubuntu中安装的python版本号 python ...

  4. Linux 系统管理命令

    1,uanme 查看是什么系统 uname - r 查看系统内核版本 2 cat /proc/cpuinfo 查看cpu 信息 3 cat /proc/meminfo 查看内存信息 4 date 查看 ...

  5. java集合类图

  6. python seek()方法报错:“io.UnsupportedOperation: can't do nonzero cur-relative seeks”

    今天使用seek()时报错了, 看下图 然后就百度了一下,找到了解决方法 这篇博客https://www.cnblogs.com/xisheng/p/7636736.html 帮忙解决了问题, 照理说 ...

  7. Thread(26)

    1.进程:进程指正在运行的程序.确切的来说,当一个程序进入内存运行,即变成一个进程,进程是处于运行过程中的程序,并且具有一定独立功能. 2.线程:线程是进程中的一个执行单元,负责当前进程中程序的执行, ...

  8. golang学习笔记5 用bee工具创建项目 bee工具简介

    golang学习笔记5 用bee工具创建项目 bee工具简介 Bee 工具的使用 - beego: 简约 & 强大并存的 Go 应用框架https://beego.me/docs/instal ...

  9. Nginx rewrite(重写)

    Nginx Rewrite规则相关指令  Nginx Rewrite规则相关指令有if.rewrite.set.return.break等,其中rewrite是最关键的指令.一个简单的Nginx Re ...

  10. 解决webgl使用canvas.toDataURL()没有内容的问题

    转的,记录一下,我还没有验证. 这个问题很好解决,就是在获取webgl对象的时候,多传入一个{preserveDrawingBuffer: true},然后在使用canvas.toDataURL()获 ...