mozillazg's Blog
  • Feed
  • About
  • Archives

[linux]创建指定大小的文件

2013-08-03

linux Tags linux
  • 参考

比如创建 10M 大小的文件:

# 创建大小为 10M 的文件:abc.exe
dd if=/dev/zero of=abc.exe bs=1M count=10

# 只生成属性为 10M 大小的文件,但不占用实际硬盘空间
dd if=/dev/zero of=abc.exe bs=1M seek=10 count=0

参考

  • Linux生成指定大小文件的方法

微信扫一扫:分享

Scan me!

微信里点“发现”,扫一下

二维码便可将本文分享至朋友圈。

有任何建议和想法欢迎在下方评论区留言或者加我微信交流

Related Posts:

  • Python: linux 环境下如何修改 PIPE buffer size
  • [linux] 修复 Redmine 无法发送通知邮件,提示 550 5.7.1 Unable to relay 的问题
  • [linux]配置 vsftp 启用被动模式(passive mode)解决客户端"no route to host"错误
  • [linux]修复 gcc 编译时的出现的 "CPU you selected does not support x86-64 instruction set" 错误
  • [linux]无法启动 rabbitmq-server,出现 timeout 错误

Comments


© 2025 mozillazg · Powered by pelican-bootstrap3, Pelican, Bootstrap · Privacy

Creative Commons License "mozillazg's Blog" by mozillazg is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where indicated otherwise.

Back to top