syscall.sh / x64 / truncate

truncate

truncate a file to a specified length

sys_truncate(const char *path, long length)
number76 (0x4c)
abicommon
entry pointsys_truncate
sinceLinux 3.3
man pagetruncate(2)
sourceelixir.bootlin.com

Registers

registervalue
rax76, the syscall number
rdiconst char *path
rsilong length
raxthe return value

Then run syscall to enter the kernel.

Same syscall on other architectures

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