Erjing’s Blog

August 22, 2008

Filed under: I love life — erjing @ 1:15 am

find -maxdepth 1 -type d -name “*” cp XXX {} \;

-maxdepth 必须在-type前

-t d 所有的目录

–maxdepth 几级目录

作用:给当前目录下的所有目录里干点啥…

find -maxdepth 1 -type f -name “*”

当前目录的所有文件

哎,越来越不自信,虽然这命令不用想也能打出来…但是想起来前天死活忘记在后面加{} \; 足足搞了半个小时…算了,还是勤快点记着吧。

No Comments

You must be logged in to post a comment.

Powered by WordPress