[ncolug] Re: some bash to shorten

  • From: <cstickelman@xxxxxxxxxx>
  • To: ncolug@xxxxxxxxxxxxx
  • Date: Mon, 30 Nov 2009 0:04:54 -0500

How about:
 ls -l /proc/kcore | cut -f5 -d" "

or
 ls -lh /proc/kcore | cut -f5 -d" "

if you want the results to be human-readable...

Chuck

---- nor thern <zboson2003@xxxxxxxxx> wrote: 
> grep "MemTotal" /proc/meminfo|cut -d ":" -f2|sed '/ kB/ s/ kB//g'|cut -c9-
> 
> this is the shortest that i have found to print the RAM size as an integer.
> unprivileged user .
> suggestions to shorten this appreciated.  
> 
> 





To unsubscribe send to ncolug-request@xxxxxxxxxxxxx with 'unsubscribe' in the 
Subject field.

Other related posts: