Hi,

I noticed that if I provide a folder as reference, a "file too large"
error is shown. If the specified file exists, no truncation happens.
Otherwise, an empty file is created. It's admittedly an edge case, so
I'm not sure what the expected behavior is.

Here are the steps to reproduce:

$ mkdir folder
$ truncate --reference=folder/ foobar
truncate: failed to truncate 'foobar' at 9223372036854775807 bytes:
File too large
$ echo $?
1
$ ls -l foobar
-rw-r--r-- 1 dho dho 0 Sep  5 14:05 foobar

I'm using coreutils 9.11.

Context: I noticed it while working on uutils coreutils.

Regards,
Daniel



Reply via email to