exec命令

mac2022-06-30  97

exec解释:

find . -type f -mtime +14 -exec rm {} \; 

如上所示,-exec  后面跟要执行的命令,然后是{ },一个空格和一个\,最后是一个分号。 它的终止是以;为结束标志的,所以这句命令后面的分号是不可缺少的,考虑到各个系统中分号会有不同的意义,所以前面加反斜杠转义

{}   花括号里面传入find到的内容

 

1、exec安全删除模式  它将在对每个匹配到的文件进行操作之前提示你

[root@localhost] ~$ find . -name "*.txt" -ok rm {} \; < rm ... ./xargs.txt > ? n < rm ... ./temp.txt > ? n < rm ... ./t t.txt > ? n < rm ... ./out2.txt > ? n

 

转载于:https://www.cnblogs.com/fanren224/p/8468872.html

相关资源:iOS UICollectionView 纯代码布局,添加Section Header 头部视图跟 Section Footer尾部视图
最新回复(0)