Subject: Re: File "/etc/[" erased
To: Jaume Samperiz <bamokato@intercom.es>
From: Knut A. Syed <Knut.Syed@nhh.no>
List: netbsd-help
Date: 05/16/2000 21:50:41
Jaume Samperiz <bamokato@intercom.es> writes:

> I have NetBsd/i386 1.4.2 installed but I have erased a file
> with a strange name:  " /etc/[  "(an square bracket)  or something like 
> this. 

I believe the file in question is /bin/[

$ ls -li /bin/test /bin/[
5823 -r-xr-xr-x  2 root  wheel  36864 Dec 23  1998 /bin/[
5823 -r-xr-xr-x  2 root  wheel  36864 Dec 23  1998 /bin/test

> What is the task of this file?.

/bin/[ is another name for /bin/test.  It allows constructs like
'if [ -f /tmp/f.txt ]; then ...' 'man test' will tell you more.

> Can I fix this error without reinstalling all the system?.

Make /bin/[ a hard link to /bin/test: 
# ln /bin/test /bin/[

~kas