Linux command to show memory in use EC2 Amazon Linux AMI

Sometimes you may wish to see how much memory your application is eating up on your amazon ec2 instance (or indeed any other linux box) you can do this by running the command below, at terminal (over SSH).

free -m

You’ll get something like this pop up.

root@ip-101-101-101-101 ec2-user]# free -m
             total       used       free     shared    buffers     cached
Mem:           594        565         28          0          3         73
-/+ buffers/cache:        489        105
Swap:            0          0          0

The important part is the second line which will give you the total free memory after everything else.

Show hidden files in Mac OS X Finder in one command

Showing those pesky hidden files like ~/.ssh/ couldn’t be easier.

Firstly open up terminal and run the following command

defaults write AppleShowAllFiles TRUE

Then to make the changes take effect run this

killall Finder

This will reboot Finder. If sometime in the future you wish to change it back just run the first command using ‘FALSE’ instead of TRUE.

Job done.