LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 767|回复: 3

[solved]bash redirect问题

[复制链接]
发表于 2006-11-17 18:47:16 | 显示全部楼层 |阅读模式
请问我想把find /var/log -type f 的所有file 运行:> 这个命令 我该怎样写呢??
我试过find /var/log -type f -exec :> {} \; 不行阿。。。。
 楼主| 发表于 2006-11-18 13:19:58 | 显示全部楼层
push..
回复 支持 反对

使用道具 举报

发表于 2006-11-18 14:25:37 | 显示全部楼层
find -type f|while read file;do :>$file;done
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-18 15:28:27 | 显示全部楼层
Post by 寂寞烈火
find -type f|while read file;do :>$file;done


解決了,感謝...:thank
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表