dos2unix changed directories to files

From: rodalpho@hush.com
Date: Wed Sep 11 2002 - 14:14:21 EDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

One of our sysadmins managed to run the following as root in the root directory of a solaris 8 machine, and I'm stumped as to how to fix it. I can't seem to replicate this behavior on another solaris8 machine, which is the really weird part-- the dos2unix just hangs.

for i in `ls`; do
dos2unix $i $i
done

Before he stopped it, this process changed many of the directories off the root into files. Some of the critical files (formerly directories) in the rootdir look like this:

- -rw-r--r-- 1 root other 9215 Sep 10 21:23 bin
- -rw-r--r-- 1 root other 8703 Sep 10 21:23 dev
- -rw-r--r-- 1 root other 512 Sep 10 21:23 devices
- -rw-r--r-- 1 root other 3576 Sep 10 21:23 etc
- -rw-r--r-- 1 root other 512 Sep 10 21:23 export
- -rw-r--r-- 1 root other 512 Sep 10 21:23 home

... and so on. I rebooted the machine from the CD and fsck'd but the directories were not fixed. Does anyone have any suggestions on how to fix this beyond reinstalling the OS files on top of themselves? I've been doing research on this all night but it never seems to have happened to anyone before in the history of the universe! There should be some way to fix the pointer in the filesystem to change that dash to a "d", but I can't seem to figure out how.

Thank you very much for any assistance!

Anthony Rivera

-----BEGIN PGP SIGNATURE-----
Version: Hush 2.1
Note: This signature can be verified at https://www.hushtools.com

wlkEARECABkFAj1/h+MSHHJvZGFscGhvQGh1c2guY29tAAoJEJ5bCJQcUSdme/0Ani2e
21Gr7Lz5Uort5dK7kdL1+ZhoAKCamGKgUBVmB66jyENt/Qj0Uk2cPg==
=QQGE
-----END PGP SIGNATURE-----

Get your free encrypted email at https://www.hushmail.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:55 EDT