truncate tool - must be root?

Ruslan Ermilov ru at freebsd.org
Tue May 30 09:25:31 PDT 2006


On Tue, May 30, 2006 at 10:59:11AM -0500, Eric Anderson wrote:
> Is it expected that truncate(8) must be used by a superuser?  If so, 
> then the man page should probably mention it.  If not, then it's broken :)
> 
If you speak about truncate(1), it works here under non-root:

$ uname -sr
FreeBSD 7.0-CURRENT
$ dd if=/dev/zero of=foo bs=64k count=10
10+0 records in
10+0 records out
655360 bytes transferred in 0.002590 secs (253040511 bytes/sec)
$ id -u
1001
$ truncate -s 0 foo
$ ls -l foo
-rw-------  1 ru  ru  0 May 30 19:21 foo
$ 

-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060530/d14274cd/attachment.pgp


More information about the freebsd-hackers mailing list