To get a ls (file list) or df (disk free) to show in K,M or G instead of *huge* numbers of bytes without commas, use the -h flag.
ls -lh df -h
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
You need to create an account or log in to post comments to this site.
» ws - web search from the com... in shell osx mac search bash unix commandline web
» snippet in shell osx mac html bash unix commandline web download convert textutil ed snippet
» Compressing a directory with... in shell cmd command line unix linux commandline terminal recursive base directory rar rarring archive archiving compress compression compressing based recursion
» Terminal window commands in shell osx mac bash unix osascript text window terminal color title bar escape sequence background
» Terminal window commands in shell osx mac bash unix code osascript text window terminal color title bar escape background ansi
» Testing Terminal RGB color c... in shell osx mac bash unix applescript osascript window terminal color rgb combination
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails
For a file sized 6,582,637 bytes, returns 6.3M while returns 6.6M. Depending on the particular version of <tt>ls(1)</tt> or <tt>df(1)</tt>, <tt>-h</tt> could vary, resulting in confusion.