---
title: "Linux通过Find批量修改文件权限"
id: "263"
type: "post"
slug: "linux%e9%80%9a%e8%bf%87find%e6%89%b9%e9%87%8f%e4%bf%ae%e6%94%b9%e6%96%87%e4%bb%b6%e6%9d%83%e9%99%90"
published_at: "2020-01-29T13:12:57+00:00"
modified_at: "2020-01-29T13:13:11+00:00"
url: "https://www.hitsword.org/2020/263.html"
markdown_url: "https://www.hitsword.org/2020/263.md"
excerpt: "[bash] #批量修改文件夹权限为755 find -type d -print0 | xargs -0 chmod 755 #批量修改文件权限为644 find -type f -print0 | xargs -0 chmod 644 [/bash]"
taxonomy_category:
  - "Centos"
  - "Shell脚本"
taxonomy_post_tag:
  - "Centos"
  - "Linux"
---

# Linux通过Find批量修改文件权限

```
#批量修改文件夹权限为755
find -type d -print0 | xargs -0 chmod 755
#批量修改文件权限为644
find -type f -print0 | xargs -0 chmod 644
```
