12

one line command to change mode only if necessary

view full story
linux-howto

http://www.unix.com – 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 Thanks, -srinivas yelamanchilli (HowTos)