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

"Matthieu Dubuget [email protected] [ocaml_beginners]" <[email protected]>
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
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.