Memory Free Custom Example

Consider this command for Linux machines:


It returns the following table.

total: used: free: shared: buffers: cached:
Mem: 131084288 54214656 76869632 26947584 7938048 28471296
Swap: 70148096 3387392 66760704
MemTotal: 128012 kB
MemFree: 75068 kB
MemShared: 26316 kB
Buffers: 7752 kB
Cached: 27804 kB
SwapTotal: 68504 kB
SwapFree: 65196 kB

The following table identifies the field values to use to obtain the value for MemFree from the preceding table:

Command cat /proc/meminfo
Single execution Checked
Regular expr ^MemFree:.*$
Field index 2
Separators Check Whitespaces are separators
Lines to skip 0