-1

Is there a way to change perms only on files/folders not on those perms already?

Say, if executing find . -type f -exec chmod 0640 {} \; on a file that is already in 0640, skip it and don't overwrite.

I'm syncing (trough lsyncd) files from one to many hosts and when executing that command, ALL files are modified and so, all files are also synced. Thanks.

CrazyRabbit
  • 251
  • 3
  • 10

1 Answers1

0

The correct and fastest way is

find . -type f ! -perm 644 -exec chmod 644 {} \;

CrazyRabbit
  • 251
  • 3
  • 10