Unlocking locked files in Mac OS

Let's say you are trying to change the permissions of some files (using chown or chmod), but you get an error:

Operation not permitted

Apple and Mac IT SupportThis is (in most cases) because the files are locked (you can verify that by going to "Get Info" for each file or directory). One way to solve it is to go through the list of permission errors and manually unlock them using Finder. A quicker way is to do it on a command line:

Reboot mac using command line

Sometimes it is necessary to restart a Mac remotely, especiallyapple-logo when there's no direct access to the GUI. A quick way to do that is by logging on to the server with an admin account using SSH (assuming ssh is permitted) and running the following command:

sudo /sbin/shutdown -r now

shutdown: will shutdown the system

-r: stands for "restart"

now: do not wait for timeout and restart the system right away