wa8ycd@skvax1.csc.ti.com (05/10/91)
Hi Y'all, This should probably be posted in comp.unix.really.stupid, but I don't know how to get to that newsgroup. :-) We have just put in some Sun SparcStation IPCs (and a Sparcstation 2 with lotsa hard disk) and I was goofing around the other day and broke one of the IPCs. (1) I was logged in as root which was probably my first mistake, and (2) I was moving (attempting to...) all the files in one sub-directory up one level. Here's how I (tried to...) did it: % cd /usr/mydir % ls mysubdir % ls mysubdir file1 file2 file3 file4 % mv mysubdir/* ../mydir WHAM! This is where the node stopped working. I admit to being dangerously ignorant about the way unix commands work, but coming from a DOS environment, I guess I am worse off because of making assumptions I shouldn't about what ".." means. Could some kind guru explain to me (in monosyllables, please!) what I did? I've tried asking around here, and looking through several volumes of books and have not found an answer. [[at least, not one I am comfortable with!]] SYMPTOM: /bin seemed to be clobbered. It showed up as a "bad directory" when we tried to "cd" to it. "ls" and other commands were not available since /bin was not valid. Thanks, Bob West WA8YCD Texas Instruments Inc. DSEG Human Resource Development Dallas TX (214) 917-1908 rlwest@flopn2.csc.ti.com
bharat@computing-maths.cardiff.ac.uk (Bharat Mediratta) (05/11/91)
In article <1991May9.121406.49@skvax1.csc.ti.com> wa8ycd@skvax1.csc.ti.com writes: >Hi Y'all, > (1) I was logged in as root which was probably my first mistake, and > (2) I was moving (attempting to...) all the files in one sub-directory > up one level. Here's how I (tried to...) did it: > > % cd /usr/mydir > % ls > mysubdir > % ls mysubdir > file1 file2 file3 file4 > % mv mysubdir/* ../mydir > [stuff deleted] > Could some kind guru explain to me (in monosyllables, please!) what I did? Well, from a syntax point of fiew, you didn't do much wrong. The '*' in the move command will match all the files that don't begin with a '.'. Therefore what you should have wound up with was: % ls file1 file2 file3 file4 mysubdir % > SYMPTOM: /bin seemed to be clobbered. It showed up as a "bad directory" > when we tried to "cd" to it. "ls" and other commands were not > available since /bin was not valid. Okay. So if you moved things from a directory called /usr/mydir/subdir to /usr/mydir then the problem's probably not due to what you were doing immediately when it crashed. However, if you moved something like /usr/kvm or /usr/adm around... -- | Bharat Mediratta | JANET: bharat@cm.cf.ac.uk | +--------------------+ UUNET: bharat%cm.cf.ac.uk%cunyvm.cuny.edu@uunet.uucp | |On a clear disk... | uk.co: bharat%cm.cf.ac.uk%cunyvm.cuny.edu%uunet.uucp@ukc| |you can seek forever| UUCP: ...!uunet!cunym.cuny.edu!cm.cf.ac.uk!bharat |