[plug] Does anyone know where i can get source for dos2unix?

Matt Kemner zombie at networx.net.au
Wed Jun 2 15:39:18 WST 1999


On Tue, 1 Jun 1999, John Summerfield wrote:

> > > for file in $(find .); do tr -d '\r' <$file >/tmp/trimmed; mv -f
> > > /tmp/trimmed $file; done
> > 
> > I wouldn't recommend running this as root.  Actually, I wouldn't
> > recommend running this at all. :)
> 
> I do dry runs first to see what's being hit.

What Christian was referring to, was that if someone else on your system
ran ln -s /etc/passwd /tmp/trimmed before you ran that command as root,
your passwd file would be overwritten.

Using /tmp/ for temporary files like that is a VERY bad idea on a
multiuser system.

Better would be to use "~/trimmed" instead of "/tmp/trimmed"

 - Matt



More information about the plug mailing list