dd find exec
来源:互联网 发布:java方法高并发 编辑:程序博客网 时间:2024/06/11 09:46
给file1文件大小增加到3M
[root@localhost mnt]# touch file1 file2
[root@localhost mnt]# ll
总用量 0
-rw-r–r– 1 root root 0 7月 19 11:41 file1
-rw-r–r– 1 root root 0 7月 19 11:26 file2
[root@localhost mnt]# dd if=/dev/zero of=file1 bs=1M count=3 (用零源源不断地填充file1文件)
记录了3+0 的读入
记录了3+0 的写出
3145728字节(3.1 MB)已复制,0.00323493 秒,972 MB/秒
[root@localhost mnt]# ll
总用量 3072
-rw-r–r– 1 root root 3145728 7月 19 11:42 file1
-rw-r–r– 1 root root 0 7月 19 11:26 file2
找出/mnt目录下文件大小大于2M的文件并删除
[root@localhost mnt]# find -type f -size +2M -exec rm -f {} \;
[root@localhost mnt]# find -type f -size +2M | xargs rm -f ;
[root@localhost mnt]# ll
总用量 0
-rw-r–r– 1 root root 0 7月 19 11:26 file2
-exec
1.参数是一个一个传递的,传递一个参数执行一次rm
2.文件名有空格等特殊字符也能处理
-xargs
1.一次将参数传给命令,可以使用-n控制参数个数
2.ls cp rm 不支持直接管道符,需要传递参数xargs
- dd find exec
- find -exec
- find -exec
- linux find exec rm
- find -exec | xargs
- linux find exec rm
- find . -name -exec rm {} \;
- find -exec xargs
- find命令之exec
- find exec rm
- find命令之exec
- find exec rm
- linux find -exec 用法
- find命令之exec
- find命令之exec
- find命令之exec
- Linux find 命令-exec
- find命令之exec
- FPGA I/O 口 时钟约束
- Android 集成极光推送(Android studio)
- sql server 的T-SQL 学习笔记(三)
- python opencv入门 基本图像操作(6)
- <转>获取对象属性的点方法和中括号法的区别
- dd find exec
- ]数据结构:单链表之判断两个链表是否相交及求交点(带环、不带环)
- js中几种实用的跨域方法原理详解
- java.lang.NoClassDefFoundError: okhttp3.HttpUrl$Builder$ParseResult
- Spring MVC数据处理
- 邮箱在本地能发送成功,在服务器发送失败。
- 【Deep Learning】caffe学习笔记(二):mnist
- 横向右到左圆角进度ProgressBar
- Linux join命令