
{"id":6916,"date":"2012-03-23T19:19:38","date_gmt":"2012-03-23T19:19:38","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=6916"},"modified":"2012-03-23T19:19:38","modified_gmt":"2012-03-23T19:19:38","slug":"ls-block-size-option","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2012\/03\/23\/ls-block-size-option\/","title":{"rendered":"A look into ls ( &#8211;block-size option ) in GNU"},"content":{"rendered":"<p><u>ABOUT ls &#8211;block-size<\/u><\/p>\n<pre>\nwith -l, scale sizes by SIZE when printing them; e.g., '--block-size=M'\n<\/pre>\n<p>[bash light=&#8221;true&#8221;]<br \/>\n$ls<br \/>\ninfo  man<br \/>\n$ls -l<br \/>\ntotal 8<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 4096 Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 4096 Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=B<br \/>\nls: invalid &#8211;block-size argument `B&#8217;<br \/>\n$ls -l &#8211;block-size=KB<br \/>\ntotal 9kB<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 5kB Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 5kB Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=M<br \/>\ntotal 1M<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 1M Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 1M Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=MB<br \/>\ntotal 1MB<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 1MB Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 1MB Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=T<br \/>\ntotal 1T<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 1T Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 1T Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=K<br \/>\ntotal 8K<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 4K Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 4K Nov 22 18:51 man<br \/>\n$ls<br \/>\ninfo  man<br \/>\n$ls -l<br \/>\ntotal 8<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 4096 Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 4096 Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=10MB<br \/>\ntotal 1<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 1 Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 1 Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=5MB<br \/>\ntotal 1<br \/>\ndrwxr-xr-x 2 jeffrin jeffrin 1 Nov 22 20:39 info<br \/>\ndrwxr-xr-x 3 jeffrin jeffrin 1 Nov 22 18:51 man<br \/>\n$ls -l &#8211;block-size=5 MB<br \/>\nls: cannot access MB: No such file or directory<br \/>\n$ls -l &#8211;block-size=MB 5<br \/>\nls: cannot access 5: No such file or directory<br \/>\n$<br \/>\n[\/bash]<\/p>\n<p><u>KNOWLEDGE<\/u><\/p>\n<pre>\nIn computing (specifically data transmission and data storage), a block, sometimes called a physical record, is a sequence of bytes or bits, usually containing some whole number of records, having a maximum length, a block size.[1] Data thus structured are said to be blocked. The process of putting data into blocks is called blocking, while deblocking is the process of extracting data from blocks. Blocked data is normally stored in a data buffer and read or written a whole block at a time. Blocking reduces the overhead and speeds up the handling of the data-stream.[2] For some devices, such as magnetic tape and CKD disk devices, blocking reduces the amount of external storage required for the data. Blocking is almost universally employed when storing data to 9-track magnetic tape, NAND flash memory, and rotating media such as floppy disks, hard disks, and optical discs.\n<\/pre>\n<p>LINK<br \/>\n<a href=\"http:\/\/man7.org\/linux\/man-pages\/man1\/ls.1.html\">http:\/\/man7.org\/linux\/man-pages\/man1\/ls.1.html<\/a><br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Block_(data_storage)\">https:\/\/en.wikipedia.org\/wiki\/Block_(data_storage)<\/a><br \/>\n<a href=\"https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/Block-size.html\">https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/Block-size.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT ls &#8211;block-size with -l, scale sizes by SIZE when printing them; e.g., &#8216;&#8211;block-size=M&#8217; [bash light=&#8221;true&#8221;] $ls info man $ls -l total 8 drwxr-xr-x 2 jeffrin jeffrin 4096 Nov 22 20:39 info drwxr-xr-x 3 jeffrin jeffrin 4096 Nov 22 18:51 man $ls -l &#8211;block-size=B ls: invalid &#8211;block-size argument `B&#8217; $ls -l &#8211;block-size=KB total 9kB drwxr-xr-x &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2012\/03\/23\/ls-block-size-option\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A look into ls ( &#8211;block-size option ) in GNU&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[486,1077],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6916"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=6916"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6916\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=6916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=6916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=6916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}