当前位置: 首页 > news >正文

qnx du统计目录大小单位

在qnx上使用du命令统计目录大小时,发现统计数值与实际大小不一样。

比如目录下有个已知1gb大小的问题,但du统计出来的值跟1gb差太多了

# ls -al
total 2097169
drwxrwxrwx   2 root      root           4096 Jan 01 00:21 .
drwxrwxrwx   6 root      root           4096 Jan 01 00:07 ..
-rw-r--r--   1 root      root      1073741825 Jan 01 00:21 1gb.bin
# du -s2097161 .

查看qnx关于du命令的文档

The space figures are displayed in 512-byte blocks by default. If you want du to print the size in bytes, you specify the -p option. The sizes output by du when you specify the -p option are accurate with one exception. The numbers may be slightly higher than expected because they include extent blocks that are part of filesystem overhead associated with the file, but don’t contain actual data.

If you specify nondirectories, they aren’t listed unless you specify the -a option.

Files with multiple links are reported only once.

与Linux不同的是,du -s显示的大小是以512byte为单位的,也就是说du -s的值x512后等于实际大小。如果想直接以1byte为单位显示,把-s参数改为-p参数即可。

# ls -al
total 2097169
drwxrwxrwx   2 root      root           4096 Jan 01 00:21 .
drwxrwxrwx   6 root      root           4096 Jan 01 00:07 ..
-rw-r--r--   1 root      root      1073741825 Jan 01 00:21 1gb.bin
# du -p1073746432 .
http://www.lryc.cn/news/309473.html

相关文章:

  • 测试人员如何向开发人员准确清晰地描述问题?
  • 何恺明新作 l-DAE:解构扩散模型
  • 【数学建模获奖经验】2023第八届数维杯数学建模:华中科技大学本科组创新奖获奖分享
  • Kubernetes(k8s第二部分)
  • mac新环境
  • 神经网络基础知识:LeNet的搭建-训练-预测
  • SpringMVC 学习(七)之报文信息转换器 HttpMessageConverter
  • 浅谈密码学
  • Android 混淆是啥玩意儿?
  • 【嵌入式——QT】QListWidget
  • 爬虫入门到精通_基础篇5(PyQuery库_PyQuery说明,初始化,基本CSS选择器,查找元素,遍历,获取信息,DOM操作)
  • 用冒泡排序模拟C语言中的内置快排函数qsort!
  • 智慧公厕:打造智慧城市环境卫生新标杆
  • 【学习版】Microsoft Office 2021安装破解教程
  • 基于java Springboot实现课程评分系统设计和实现
  • git操作基本指令
  • YOLO算法
  • 【Android】更改手机主题导致app数据丢失问题
  • Dell R730 2U服务器实践3:安装英伟达上代专业AI训练Nvidia P4计算卡
  • Nacos环境搭建 -- 服务注册与发现
  • Linux了解
  • Keil新版本安装编译器ARMCompiler 5.06
  • 【基础训练 || Test-1】
  • Python读取hbase数据库
  • LeetCode41题:缺失的第一个正数(python3)
  • C# DataTable 对象操作
  • web运行时安全
  • FPGA 与 数字电路的关系 - 这篇文章 将 持续 更新 :)
  • 18 SpringMVC实战
  • Rocky Linux 运维工具 dnf