[PATCH] allow empty files creation with install

Kostik Belousov kostikbel at gmail.com
Sat Jul 17 14:11:41 UTC 2010


On Sat, Jul 17, 2010 at 03:34:08PM +0200, joris dedieu wrote:
> This patch add a -t switch to install(3). This is a small feature for
> lazy sysadmins.
> 
> before :
> 
> touch /usr/home/foo/.history /usr/home/foo/.bash_history
> chown foo /usr/home/foo/.history /usr/home/foo/.bash_history
> chmod 600 /usr/home/foo/.history /usr/home/foo/.bash_history
> chflags sappend /usr/home/foo/.history /usr/home/foo/.bash_history
> 
> after :
> 
> install -o foo -g foo -m 600 -f sappend /usr/home/foo/.history
> /usr/home/foo/.bash_history
> 

Isn't /dev/null as a source file work better ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100717/e716f4d2/attachment.pgp


More information about the freebsd-hackers mailing list