[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: creating new partitions



On Wed, 22 Sep 1999, Godfried Duodu wrote:

> I have installed a 250 meg hard drive on my linux box. I did fdisk to
> partition it and used the command mke2fs /dev/hdb1 to format. I edited
> /etc/fstab to mount it as /var. On hda1, I did mv /var/* /var_old and
> issued the mount -a command then did cp -a /var_old /var. I rebooted
> and was getting errors messages of non existent directories. What
> could I have done differently? Thanks and have a great day!

A few observations:
  mv /var/* /var_old      - where there any hidden files or directories in
                            /var?  These would not have been moved with
                            this command.

  cp -a /var_old /var     - I suspect that the contents of your new
                            /var is now:    /var/var_old

If the destination file does not exist, then the above command would have 
worked.  However, because /var existed, then the 'cp' command will copy
the enter source directory into the destination directory, including the
source directory itself.

If /var looks like:  /var/var_old  then just do:
   cd /var/var_old
   mv * ../
   cd ..
   rmdir var_old

-- 
denice.deatrich @ NospaM.epfl.ch, EPFL - LCAV / LCM    PH: +41 (21) 693-5643
                  (If replying by email please remove 'NospaM' from address.)
<*> This moment's fortune cookie:
Adding features does not necessarily increase functionality -- it just
makes the manuals thicker.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]