http://suchalin.blog.163.com/blog/static/55304677201062924959497/

Linux 查看文件夹大小及文件数量命令

2010-07-29 14:49:59|  分类: linux|举报|字号 订阅

当文件数量太多。想知道文件总数。用ls|wc -l命令会使server负载升高。能够參考例如以下命令,

查看当前文件夹大小:

[root@21andy.com]# du -sh

查看指定文件夹大小:

[root@21andy.com]# du -sh /www/21andy.com

查看当前文件夹文件总数:

[root@21andy.com]# find . -type f |wc -l

查看指定文件夹文件总数:

[root@21andy.com]# find /www/21andy.com -type f |wc -l

查看当前文件夹的文件夹总数:

[root@21andy.com]# find . -type d |wc -l

查看指定文件夹的文件夹总数:

[root@21andy.com]# find /www/21andy.com -type d |wc -l

linux document and directory find的更多相关文章

  1. Linux: HowTo See Directory Tree Structure

    https://www.cyberciti.biz/faq/linux-show-directory-structure-command-line/ Linux: HowTo See Director ...

  2. linux cd root directory

    linux cd root directory https://www.cyberciti.biz/faq/how-to-change-directory-in-linux-terminal/ htt ...

  3. Linux inode && Fast Directory Travel Method(undone)

    目录 . Linux inode简介 . Fast Directory Travel Method 1. Linux inode简介 0x1: 磁盘分割原理 字节 -> 扇区(sector)(每 ...

  4. [linux] cp: omitting directory `XXX'问题解决

    在linux系统中复制文件夹时提示如下: cp: omitting directory `foldera/' 其中foldera是我要复制的文件夹名,出现该警告的原因是因为foldera目录下还存在目 ...

  5. Linux磁盘管理——directory tree与mount point

    参考:/sys 和 /dev 区别 Linux磁盘管理——虚拟文件系统 Directory tree Linux内的所有数据都是以文件的形态来呈现的,所以整个Linux系统最重要的地方就是direct ...

  6. linux使用su切换用户提示 Authentication failure的解决方法& 复制文件时,报cp: omitting directory `XXX'

    linux使用su切换用户提示 Authentication failure的解决方法:这个问题产生的原因是由于ubtun系统默认是没有激活root用户的,需要我们手工进行操作,在命令行界面下,或者在 ...

  7. 学习linux命令,看这篇2w多字的linux命令详解

    用心分享,共同成长 没有什么比每天进步一点点更重要了 本文已收录到我的github:https://github.com/midou-tech/articles/tree/master/docs/li ...

  8. Linux目录树

    Linux目录树(directory tree) 分层结构(不同于数据库文件系统),单个文件/目录的最大长度为255个字符,完整路径为4096个字符 特殊的文件系统 文件系统 挂载点 说明 Root ...

  9. Static, Shared Dynamic and Loadable Linux Libraries

    转载:http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html Why libraries are used: Th ...

随机推荐

  1. set指令详解

    set指令详解 功能说明:设置shell 语 法:set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] 说 明:设置或取消设置shell选项 ...

  2. SolrCloud 概念

    原文链接 https://www.w3cschool.cn/solr_doc 当您的集合对于一个节点来说太大时,您可以通过创建多个分片将其分解并分段存储. 碎片是集合的逻辑分区,包含集合中的文档的子集 ...

  3. DEV Express中NavBarCointrol的使用

    尚未对内容进行删减,内容有偏差和冗余,谨慎阅读. 发现在后面,写在前面: 13,之前在Default模式下,之所以很多Appearance属性都起不到作用,是因为Control的LookAndFeel ...

  4. 【转】Entity Framework6 with Oracle(可实现code first)

    Oracle 已在2014年底提供对EF6的支持.以前只支持到EF5.EF6有很多有用的功能 值得升级.这里介绍下如何支持Oracle   一.Oracle 对.net支持的一些基础知识了解介绍. 1 ...

  5. sysctl.conf文件配置详解

    ############################# net.inet.ip.sourceroute=0 net.inet.ip.accept_sourceroute=0 ########### ...

  6. 使用 wsgiref 创建WSGI APP

    wsgify装饰器将一个普通函数转变成WSGI应用程序. class webob.dec.wsgify(func=None, RequestClass=None, args=(), kwargs=No ...

  7. Relocation(状压DP)

    Description Emma and Eric are moving to their new house they bought after returning from their honey ...

  8. POJ-1861,Network,最小生成树水题,,注意题面输出有问题,不必理会~~

    Network Time Limit: 1000MS   Memory Limit: 30000K          Special Judge http://poj.org/problem?id=1 ...

  9. BZOJ 1221: [HNOI2001] 软件开发【最小费用最大流】

    Description 某软件公司正在规划一项n天的软件开发计划,根据开发计划第i天需要ni个软件开发人员,为了提高软件开发人员的效率,公司给软件人员提供了很多的服务,其中一项服务就是要为每个开发人员 ...

  10. 【状压DP】OpenJ_POJ - C17K Lying Island

    https://vjudge.net/contest/171652#problem/K [题意] 小岛上有n个人,有些是好人(一定是真话),有些是坏人(可能是真话也可能是假话),现在要判断最多有多少好 ...