在 Unix Like 環境可以用 chmod 改變檔案或目錄的權限,以下方法可以只針對檔案或目錄 chmod:
1. 在當前目錄下遁迴 chmod 檔案:
find . -type f -exec chmod 0600 {} \;
2. 在當前目錄下遁迴 chmod 目錄:
find . -type d -exec chmod 0755 {} \;
關於 PHP, Linux, Open Source 及個人生活記載的網誌。
在 Unix Like 環境可以用 chmod 改變檔案或目錄的權限,以下方法可以只針對檔案或目錄 chmod:
1. 在當前目錄下遁迴 chmod 檔案:
find . -type f -exec chmod 0600 {} \;
2. 在當前目錄下遁迴 chmod 目錄:
find . -type d -exec chmod 0755 {} \;
RSS feed for comments on this post. | TrackBack URI
實用, 一直想搞清楚呢句cmd好耐, thx
Comment by semson — January 30, 2009 @ 3:57 pm