IBLOCKS(3ast) IBLOCKS(3ast)

# [NAME](#NAME)

iblocks - compute number file blocks used

# [SYNOPSIS](#SYNOPSIS)

```
#include <ls.h>
long     _iblocks(struct stat* st);
```

# [DESCRIPTION](#DESCRIPTION)

\_iblocks returns the number of blocks used by the file whose [*stat*(2)](/man/os/ksh/stat.2) information is pointed to by *st*. The count includes both data and indirect blocks.

This routine is used by **&lt;ls.h&gt;** on system without the field.

# [SEE ALSO](#SEE_ALSO)

[ls(1)](/man/os/ksh/ls.1), [stat(2)](/man/os/ksh/stat.2)

---

Document: iblocks(3ast) from ksh 1.0.10-r36 (Chainguard OS)
Source: https://github.com/ksh93/ksh
