Question about mv (for comp.unix.stupid)

Bharat Mediratta bharat at computing-maths.cardiff.ac.uk
Sat May 11 22:42:01 AEST 1991


In article <1991May9.121406.49 at skvax1.csc.ti.com> wa8ycd at 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 at cm.cf.ac.uk                               |
+--------------------+ UUNET: bharat%cm.cf.ac.uk%cunyvm.cuny.edu at uunet.uucp    |
|On a clear disk...  | uk.co: bharat%cm.cf.ac.uk%cunyvm.cuny.edu%uunet.uucp at ukc|
|you can seek forever| UUCP: ...!uunet!cunym.cuny.edu!cm.cf.ac.uk!bharat       |



More information about the Comp.unix.questions mailing list