Chmod permission of specific file extension under a folder via SSH

richard picture richard · Dec 25, 2012 · Viewed 9.2k times · Source

My folder is /images/. There are .png, .gif and .jpg images in this folder. How do I change permissions of specific file extension .jpg to 644 under the folder via SSH?

Answer

Guillaume picture Guillaume · Dec 25, 2012

Connect to the remote computer with ssh and then execute this command may work:

find /images/. -name "*.jpg" | xargs chmod 644