Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!cf-cm!bharat From: bharat@computing-maths.cardiff.ac.uk (Bharat Mediratta) Newsgroups: comp.unix.questions Subject: Re: Question about mv (for comp.unix.stupid) Message-ID: <1991May11.124201.20244@cm.cf.ac.uk> Date: 11 May 91 12:42:01 GMT References: <1991May9.121406.49@skvax1.csc.ti.com> Sender: news@cm.cf.ac.uk (USENET News System) Organization: University of Wales College of Cardiff Lines: 38 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 |