# Allow my user (u) to "execute" (x) the file bro.rb
chmod u+x bro.rb
# allow only root access to a particular folder. Useful for hiding your pr0n and any other files you don't want anyone else to see.
sudo chmod -R 700 secret_folder
# Give everyone read, write and execute access to folder 'foo' and all its contents
chmod -R 777 foo
# Let rvm install gems without sudo.
# allow your (u)ser to (w)rite and e(x)ecute things in the /Library/Ruby directory, and (-R)ecursively below it
chmod -R u+wx /Library/Ruby
# Copy permissions from one file to another
chmod --reference=otherfile thisfile
# Give everyone read and execute access to folder 'foo' and all its contents
chmod -R 555 foo