changing chmod for files but not directories

前端 未结 5 1615
野趣味
野趣味 2020-12-22 17:14

I need to use chmod to change all files recursivly to 664. I would like to skip the folders. I was thinking of doing something like this

ls -lR | grep ^-r |          


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 17:52

    with GNU find

    find /path -type f -exec chmod 644 {} +;

提交回复
热议问题