coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [patch] chmod -[cv]: be verbose about the old mode


From: Bernhard Voelker
Subject: Fwd: [patch] chmod -[cv]: be verbose about the old mode
Date: Wed, 25 May 2011 15:50:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10

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

Have a nice day,
Berny

Attachment: chmod.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]