As the output of the free -m command, I get the following:
total used free shared buffers cached
Mem: 2496 2260 236 0 5 438
-/+ buffers/cache: 1816 680
Swap: 1949 68 1881
I want to get only used memory, like 2260, as output. I tried the following command:
free -m | grep Mem | cut -f1 -d " "
Help me to improve my command.
How can I get it as a percentage, like 35%?