[ncolug] Re: some bash to shorten

  • From: <cstickelman@xxxxxxxxxx>
  • To: ncolug@xxxxxxxxxxxxx
  • Date: Thu, 3 Dec 2009 7:18:54 +0000

Which one most closely matches your understanding of the memory in the computer?

Chuck

---- "M. Knisely" <charon79m@xxxxxxxxx> wrote: 
> I get very different results from these.
> 
> mknisely@stopgap:~$ ls -lh /proc/kcore | cut -f5 -d" "
> 888M
> 
> mknisely@stopgap:~$ grep "MemTotal" /proc/meminfo|cut -d ":" -f2|sed '/ kB/
> s/ kB//g'|cut -c9-
> 3088660
> 
> Mike K.
> 
> On Mon, Nov 30, 2009 at 12:04 AM, <cstickelman@xxxxxxxxxx> wrote:
> 
> > 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.
> >
> >


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

Other related posts: