如何在-exec参数中使用重定向



如何在-exec参数中使用重定向
 
Clear log file content without impacting service that is running (in batch):
 
find . -name "*.log" -exec bash -c ">{}" \;
 
Subsitute file content in batch:
 
find -name "*.xml" -exec bash -c "sed -e 's/aaa/bbb/' {} > {}" \;

相关内容

    暂无相关文章