Skip to content

Instantly share code, notes, and snippets.

@Sam-Gram
Last active October 3, 2018 16:26
Show Gist options
  • Save Sam-Gram/dae3131bbbc597828ada7ecf407c18e3 to your computer and use it in GitHub Desktop.
Save Sam-Gram/dae3131bbbc597828ada7ecf407c18e3 to your computer and use it in GitHub Desktop.
Free Memory in MB(ish) for Linux (tested on Ubuntu 16.04)
awk 'tolower($1) ~ /memfree/ {print $2/1000 " MB"}' /proc/meminfo
#GLWT(Good Luck With That) Public License
#Copyright (c) Everyone, except Author
#The author has absolutely no clue what the code in this project does.
#It might just work or not, there is no third option.
#Everyone is permitted to copy, distribute, modify, merge, sell, publish,
#sublicense or whatever they want with this software but at their OWN RISK.
# GOOD LUCK WITH THAT PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
#0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A
#TRACE TO TRACK THE AUTHOR of the original product to blame for or hold
#responsible.
#IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#Good luck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment