[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: chmod feature request: setting different modes for files and directo
From: |
Andreas Schwab |
Subject: |
Re: chmod feature request: setting different modes for files and directories |
Date: |
Tue, 11 Aug 2009 11:06:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Pádraig Brady <address@hidden> writes:
> Tobia Conforto wrote:
>> The same is true when someone
>> extracts some files from an archive or copies them over a removable
>> media, where permissions need to be reset to something sane, like 755/644:
>>
>
> current: chmod -R 755 another/path; find another/path -type f -exec chmod
> 644 {} +
current: find another/path -type f -exec chmod 644 {} + -o type d -exec chmod
755 {} +
> proposed: chmod -R d:755,f:644 another/path
>
> This case is more valid as it would be faster since you'd be traversing
> the branch only once.
Also only one traverse with find (which is more flexible here as well).
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."