syscall.sh / x86 / truncate

truncate

truncate a file to a specified length

sys_truncate(const char *path, long length)
number92 (0x5c)
abii386
entry pointsys_truncate
sinceLinux 3.3
man pagetruncate(2)
sourceelixir.bootlin.com

Registers

registervalue
eax92, the syscall number
ebxconst char *path
ecxlong length
eaxthe return value

Then run int 0x80 to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/x86/truncate