On Sun, 12 Sep 1999, Chris Costello wrote:

> On Sun, Sep 12, 1999, Wayne Cuddy wrote:
> > Here is my directory listing:
> > drwxrwxr-x  3 wcuddy  wcuddy   512 Sep  5 17:29 $DEST_DIR
> > -rwxr-xr-x  1 wcuddy  wcuddy  2324 Sep  6 22:51 do_install.sh
> > -rw-rw-r--  1 wcuddy  wcuddy   533 Sep  5 21:12 file_list.txt
> > -rw-rw-r--  1 wcuddy  wcuddy   155 Sep  5 21:58 install.conf
> > -rw-rw-r--  1 wcuddy  wcuddy   145 Sep  6 22:27 post-install
> > -rw-rw-r--  1 wcuddy  wcuddy   144 Sep  6 22:24 pre-install
> > 
> > Here is the output of my mount:
> > /dev/da0s1a on / (asynchronous, NFS exported, local, writes: sync 26 async
> > 22259)
> > /dev/da2s1e on /home (asynchronous, local, writes: sync 8 async 5181)
> > /dev/da1s1e on /usr (asynchronous, local, writes: sync 3 async 20654)
> > procfs on /proc (local)
> > 
> > Since /home is on a separate file system I don't think it is a hard link.
> > However, if do a 'cd \$DEST_DIR' I end up in the root directory.  If I do a
> > 'rm $DEST_DIR/', I get 'rm: /: is a directory'.  If it can't be a hard link I
> > have no idea what it is.

        [This is actually  aresponse to two messages.  Sorry, but I didn't
         want to repeat myself. ]

        The root inode number of any filesystem is '2'.  I forget why, but
that's the way it is. 

        Now, first I doubt the above is a hard link to / because the
ownership is in the inode and unless you tell me that / is owned by
wcuddy:wcuddy, it cannot be linked to the same inode. 

        What does 'pwd' and 'df .' give you back as your current directory
and physical device?  You alos ought to include the '-i' in the ls command
because it will add the inode number to the listing.

        Try 'ls -l '$DEST_DIR/kernel'".  Unless you get the same output as
"ls -l /kernel", you probably just have a bad directory name.

        If you really have a a directory with a link count of three, it
ought to be a directory with exactly one subdirectory.  Given that root has
a bunch of subdirectories, a link count more like the 20 shown above is
typical.

        After reading your other messages, I think you have a "wierdly" 
named directory with another "wierdly" named directory in it.  In
particular both have $'s in their names.  I bet it looks somehting like the
following.  Note the link count for '$DEST_DIR' is 3 as in your listing
above. 

> : ubergeek@terrafirma; mkdir -p \$DEST_DIR/\$2
> : ubergeek@terrafirma; ls -laRi
> total 3
> 6020 drwxrwxr-x  3 ubergeek  wheel  512 Sep 12 14:21 $DEST_DIR/
> 6018 drwxrwxr-x  3 ubergeek  wheel  512 Sep 12 14:21 ./
>    2 drwxrwxrwt  6 root      wheel  512 Sep 12 14:12 ../
> 
> ./$DEST_DIR:
> total 3
> 6026 drwxrwxr-x  2 ubergeek  wheel  512 Sep 12 14:21 $2/
> 6020 drwxrwxr-x  3 ubergeek  wheel  512 Sep 12 14:21 ./
> 6018 drwxrwxr-x  3 ubergeek  wheel  512 Sep 12 14:21 ../
> 
> ./$DEST_DIR/$2:
> total 2
> 6026 drwxrwxr-x  2 ubergeek  wheel  512 Sep 12 14:21 ./
> 6020 drwxrwxr-x  3 ubergeek  wheel  512 Sep 12 14:21 ../

        Now your shell is probably causing you the problems.  Make sure you
are properly quoting the paths.  single and double quotes make a big
difference here.

> : ubergeek@terrafirma; \ls -ild '$DEST_DIR/$2'
> 6026 drwxrwxr-x  2 ubergeek  wheel  512 Sep 12 14:21 $DEST_DIR/$2
> : ubergeek@terrafirma; \ls -lid "$DEST_DIR/$2"
> 2 drwxr-xr-x  20 root  wheel  512 Aug  7 16:28 /

        Notice the last line.  This is probably what is happening.  Try 'rm
-rfi *' and see if you can remove all these bad directory names and start
over.  e.g.

> : ubergeek@terrafirma; rm -rfi *
> remove $DEST_DIR? y
> remove $DEST_DIR/$2? y

        If this thread is to continue, I suggest moving it to -questions,
because I'm pretty certain it's not an actual filesystem corruption issue.

cheers,

        Adrian
--
[ [EMAIL PROTECTED] -- Ubergeeks Consulting -- http://www.ubergeeks.com/ ]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to