CHMOD — различия между версиями
Root (обсуждение | вклад) (Новая страница: «Файл:Chmod.png») |
Root (обсуждение | вклад) |
||
| (не показаны 2 промежуточные версии этого же участника) | |||
| Строка 1: | Строка 1: | ||
[[Файл:Chmod.png]] | [[Файл:Chmod.png]] | ||
| + | |||
| + | |||
| + | Смена прав только у директорий (рекурсивно) | ||
| + | # find /path/to/base/dir -type d -exec chmod 755 {} + | ||
| + | или | ||
| + | # chmod 755 $(find /path/to/base/dir -type d) | ||
| + | или | ||
| + | # chmod 755 `find /path/to/base/dir -type d` | ||
| + | или | ||
| + | # find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 | ||
| + | |||
| + | |||
| + | Смена прав только у файлов (рекурсивно) | ||
| + | # find /path/to/base/dir -type f -exec chmod 644 {} + | ||
| + | или | ||
| + | # chmod 644 $(find /path/to/base/dir -type f) | ||
| + | или | ||
| + | # chmod 0755 `find /path/to/base/dir -type f` | ||
| + | или | ||
| + | # find /path/to/base/dir -type f -print0 | xargs -0 chmod 644 | ||
| + | |||
| + | |||
| + | http://docs.mirocow.com/doku.php?id=chmod | ||
Текущая версия на 12:46, 9 июня 2016
Смена прав только у директорий (рекурсивно)
# find /path/to/base/dir -type d -exec chmod 755 {} +
или
# chmod 755 $(find /path/to/base/dir -type d)
или
# chmod 755 `find /path/to/base/dir -type d`
или
# find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
Смена прав только у файлов (рекурсивно)
# find /path/to/base/dir -type f -exec chmod 644 {} +
или
# chmod 644 $(find /path/to/base/dir -type f)
или
# chmod 0755 `find /path/to/base/dir -type f`
или
# find /path/to/base/dir -type f -print0 | xargs -0 chmod 644
