---
name: "iblocks"
section: "3"
platform: "macos"
package: "ksh"
version: "42"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/iblocks"
---

# iblocks(3)

compute number file blocks used

## NAME

iblocks - compute number file blocks used

## SYNOPSIS

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

## DESCRIPTION

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

This routine is used by **\<ls.h\>** on system without the field.

## SEE ALSO

[ls(1)](/ls/1.md), [stat(2)](/stat/2.md)
