coreutils
[Top][All Lists]
Advanced

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

[coreutils] feature request: make chown/chmod/chgrp --verbose/--changes


From: marcel partap
Subject: [coreutils] feature request: make chown/chmod/chgrp --verbose/--changes additionally show original property
Date: Mon, 02 Aug 2010 13:32:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1

Dear coreutil hackers,
as anyone doing *n*x housework regularly, i also am using these tools on a regular basis, in scripts and manually. What i often miss (especially when invoking actions recursively with -Rc, and regretting part of the modifications shortly after) is the output of the original state the file was in. Example:
changed ownership of `robots.txt' to www-data:www-data
Well i am glad about that, but who was it owned by before? It would be nice to 
have this shown as one of
changed ownership of `robots.txt' to www-data:www-data (from root:root)
changed ownership of `robots.txt' from root:root to www-data:www-data
changed ownership of `robots.txt' root:root > www-data:www-data
While this example is not of much importance.. well consider this (made up):
mode of `/var/www/drupal-hfopi/files/temp/._/._/._/._/._/.shell.pl' changed to 
0666 (rw-rw-rw-)
Mmmkay, ack that file shouldn't be +x... but what would be of real interest: 
WAS it executable before? Same proposal mockup:
mode of `/var/www/drupal-hfopi/files/temp/._/._/._/._/._/.shell.pl' changed to 
0666 (rw-rw-rw-)  (from 0777 (rwxrwxrwx))
mode of `/var/www/drupal-hfopi/files/temp/._/._/._/._/._/.shell.pl' changed 
from 0777 (rwxrwxrwx) to 0666 (rw-rw-rw-)
mode of `/var/www/drupal-hfopi/files/temp/._/._/._/._/._/.shell.pl' changed: 0777 
(rwxrwxrwx) > 0666 (rw-rw-rw-)
To not break any scripts, this could be implemented as --print-original-state additional option to -v/-c. And please forgive for not attaching a finished patch ;)
best regards,
marcel.



reply via email to

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