Re: Equivalent of "du" utility in Unix or Sys module ?
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
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