Re: Equivalent of "du" utility in Unix or Sys module ?

"Doyle Jonathan [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
It is quite possible that this is what I am after, yes. Thank you for your help.I have only a nodding acquaintance with the Unix module though.I found a link : Unix system programming in OCaml and I'll read it if I havethe time. Meanwhile, if anyone has a link more directly related to my specific question,I'm interested.

|   |
|   |  |   |   |   |   |   |
| Unix system programming in OCamlUnix system programming in OCaml Xavier Leroy and Didier Rémy 1stDecember, 2014 © 1991, 1992, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Xavier Leroy and ... |
|  |
| Afficher sur ocaml.github.io | Aperçu par Yahoo |
|  |
|   |



      De : "Matthieu Dubuget [email protected] [ocaml_beginners]" <[email protected]>
 À : [email protected] 
 Envoyé le : Dimanche 21 juin 2015 13h15
 Objet : Re: "ocaml_beginners"::[] Equivalent of "du" utility in Unix or Sys module ?
   
     Have a look at Unix.open_process* functions.
 
 I think it is what you are after?
 
 Best regards
 
 Le 21/06/2015 13:09, [email protected] [ocaml_beginners] a écrit :
  
    In the ocaml interpreter, I can type 
 
 Sys.command "du -d 1 pathformydirectory ";;
 
 to inspect the disk usage in a given directory.
 
 The problem is, the result is of type unit and I would prefer a result of type, say, (string*int) list.
 
  Is there a function from the Unix or Sys module that does this ?
 
  
   
 
 -- 
Matthieu Dubuget
Guide d’autodéfense numérique : http://guide.boum.org  #yiv8979153500 #yiv8979153500 -- #yiv8979153500ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv8979153500 #yiv8979153500ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv8979153500 #yiv8979153500ygrp-mkp #yiv8979153500hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv8979153500 #yiv8979153500ygrp-mkp #yiv8979153500ads {margin-bottom:10px;}#yiv8979153500 #yiv8979153500ygrp-mkp .yiv8979153500ad {padding:0 0;}#yiv8979153500 #yiv8979153500ygrp-mkp .yiv8979153500ad p {margin:0;}#yiv8979153500 #yiv8979153500ygrp-mkp .yiv8979153500ad a {color:#0000ff;text-decoration:none;}#yiv8979153500 #yiv8979153500ygrp-sponsor #yiv8979153500ygrp-lc {font-family:Arial;}#yiv8979153500 #yiv8979153500ygrp-sponsor #yiv8979153500ygrp-lc #yiv8979153500hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv8979153500 #yiv8979153500ygrp-sponsor #yiv8979153500ygrp-lc .yiv8979153500ad {margin-bottom:10px;padding:0 0;}#yiv8979153500 #yiv8979153500actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv8979153500 #yiv8979153500activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv8979153500 #yiv8979153500activity span {font-weight:700;}#yiv8979153500 #yiv8979153500activity span:first-child {text-transform:uppercase;}#yiv8979153500 #yiv8979153500activity span a {color:#5085b6;text-decoration:none;}#yiv8979153500 #yiv8979153500activity span span {color:#ff7900;}#yiv8979153500 #yiv8979153500activity span .yiv8979153500underline {text-decoration:underline;}#yiv8979153500 .yiv8979153500attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv8979153500 .yiv8979153500attach div a {text-decoration:none;}#yiv8979153500 .yiv8979153500attach img {border:none;padding-right:5px;}#yiv8979153500 .yiv8979153500attach label {display:block;margin-bottom:5px;}#yiv8979153500 .yiv8979153500attach label a {text-decoration:none;}#yiv8979153500 blockquote {margin:0 0 0 4px;}#yiv8979153500 .yiv8979153500bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv8979153500 .yiv8979153500bold a {text-decoration:none;}#yiv8979153500 dd.yiv8979153500last p a {font-family:Verdana;font-weight:700;}#yiv8979153500 dd.yiv8979153500last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv8979153500 dd.yiv8979153500last p span.yiv8979153500yshortcuts {margin-right:0;}#yiv8979153500 div.yiv8979153500attach-table div div a {text-decoration:none;}#yiv8979153500 div.yiv8979153500attach-table {width:400px;}#yiv8979153500 div.yiv8979153500file-title a, #yiv8979153500 div.yiv8979153500file-title a:active, #yiv8979153500 div.yiv8979153500file-title a:hover, #yiv8979153500 div.yiv8979153500file-title a:visited {text-decoration:none;}#yiv8979153500 div.yiv8979153500photo-title a, #yiv8979153500 div.yiv8979153500photo-title a:active, #yiv8979153500 div.yiv8979153500photo-title a:hover, #yiv8979153500 div.yiv8979153500photo-title a:visited {text-decoration:none;}#yiv8979153500 div#yiv8979153500ygrp-mlmsg #yiv8979153500ygrp-msg p a span.yiv8979153500yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv8979153500 .yiv8979153500green {color:#628c2a;}#yiv8979153500 .yiv8979153500MsoNormal {margin:0 0 0 0;}#yiv8979153500 o {font-size:0;}#yiv8979153500 #yiv8979153500photos div {float:left;width:72px;}#yiv8979153500 #yiv8979153500photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv8979153500 #yiv8979153500photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv8979153500 #yiv8979153500reco-category {font-size:77%;}#yiv8979153500 #yiv8979153500reco-desc {font-size:77%;}#yiv8979153500 .yiv8979153500replbq {margin:4px;}#yiv8979153500 #yiv8979153500ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv8979153500 #yiv8979153500ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv8979153500 #yiv8979153500ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv8979153500 #yiv8979153500ygrp-mlmsg select, #yiv8979153500 input, #yiv8979153500 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv8979153500 #yiv8979153500ygrp-mlmsg pre, #yiv8979153500 code {font:115% monospace;}#yiv8979153500 #yiv8979153500ygrp-mlmsg * {line-height:1.22em;}#yiv8979153500 #yiv8979153500ygrp-mlmsg #yiv8979153500logo {padding-bottom:10px;}#yiv8979153500 #yiv8979153500ygrp-msg p a {font-family:Verdana;}#yiv8979153500 #yiv8979153500ygrp-msg p#yiv8979153500attach-count span {color:#1E66AE;font-weight:700;}#yiv8979153500 #yiv8979153500ygrp-reco #yiv8979153500reco-head {color:#ff7900;font-weight:700;}#yiv8979153500 #yiv8979153500ygrp-reco {margin-bottom:20px;padding:0px;}#yiv8979153500 #yiv8979153500ygrp-sponsor #yiv8979153500ov li a {font-size:130%;text-decoration:none;}#yiv8979153500 #yiv8979153500ygrp-sponsor #yiv8979153500ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv8979153500 #yiv8979153500ygrp-sponsor #yiv8979153500ov ul {margin:0;padding:0 0 0 8px;}#yiv8979153500 #yiv8979153500ygrp-text {font-family:Georgia;}#yiv8979153500 #yiv8979153500ygrp-text p {margin:0 0 1em 0;}#yiv8979153500 #yiv8979153500ygrp-text tt {font-size:120%;}#yiv8979153500 #yiv8979153500ygrp-vital ul li:last-child {border-right:none !important;}#yiv8979153500
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.