[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] chmod -[cv]: be verbose about the old mode
From: |
Pádraig Brady |
Subject: |
Re: [patch] chmod -[cv]: be verbose about the old mode |
Date: |
Wed, 25 May 2011 15:56:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
On 25/05/11 09:15, Bernhard Voelker wrote:
> Hi GNU,
>
> what about having `chmod -[cv]` also print the old mode?
>
>
> $ src/chmod -c 750 /tmp/x
> mode of `/tmp/x' changed from 0755 (rwxr-xr-x) to 0750 (rwxr-x---)
>
> $ src/chmod -c 750 /tmp/x
>
> $ src/chmod -v 750 /tmp/x
> mode of `/tmp/x' retained as 0750 (rwxr-x---)
>
> $ src/chmod -v 755 /tmp/x
> mode of `/tmp/x' changed from 0750 (rwxr-x---) to 0755 (rwxr-xr-x)
>
> $ src/chmod -v 755 /tmp # I'm not root obviously
> src/chmod: changing permissions of `/tmp': Operation not permitted
> failed to change mode of `/tmp' from 1777 (rwxrwxrwt) to 0755 (rwxr-xr-x)
>
> $ src/chmod -v 755 /x
> src/chmod: cannot access `/x': No such file or directory
> failed to change mode of `/x' from 0000 (---------) to 0000 (---------)
>
> $ src/chmod -c 755 /x
> src/chmod: cannot access `/x': No such file or directory
I like it.
I'll apply that later.
cheers,
Pádraig.