hi,
sorry for posting this for a quick answer.
Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode?
Running chmod updates the last access/modified timestamp on the files, and i want to only run chmod on those that do not already have permissions 554 set
psudeo code:
for files where mode <> 554, do chmod 554
More seriously what would be the point to look if the files have or not tests are CPU/time consuming...
My concern is more what about if directories are found there, they would be unreadable for others, if thst is the case (subdirs...) you are anyway going to have to look, in which case the one liner you are looking for is most certainly going to use find ...
Regarding why i am doing this, when chmod is done the 'c' attribute (ls -ltc) gets updated and i don't want this to be changed for those files that are already have the correct permissions.