Date: Wed, 08 Apr 1998 08:35:14 +0100 From: Mark Ovens <marko@uk.radan.com> To: "Michael P. Sale" <mike@merchantsnet.com> Cc: freebsd-newbies@FreeBSD.ORG Subject: Re: mtools use Message-ID: <352B28B2.5BDE9363@uk.radan.com> References: <01bd6296$aece1600$5006bccc@708644668>
next in thread | previous in thread | raw e-mail | index | archive | help
Michael P. Sale wrote: > > David, > > Good information! I would prefer not to have to sudo everytime I want to > mount a floppy! > > I suppose I should have realized that root was required, but I've been > trying to get ppp working (which I have been told requires root) and got > dangerously used to boppin around as root. > > So, now it's off to figure out how to get mtools > working........................................... > > Thanks for the info, > > Mike > ---------------------------------------------- > Michael P. Sale > MerchantsNet.Com > mike@merchantsnet.com > www.merchantsnet.com > ---------------------------------------------- > "Humility has no equal in the > battle for knowledge" > -- Michael, It is possible to avoid having to su to root everytime you wish to mount/umount a floppy (or any drive/filesystem) by using aliases. Adding the following aliases to your .cshrc (if you use the C shell): alias pcfs rsh <hostname> -l root "mount -t msdos /dev/fd0 /A" alias upcfs rsh <hostname> -l root "umount /A" where <hostname> is the hostname of your machine, i.e. you are rshelling into yourself. To activate these immediately type 'source .cshrc' at the prompt. Note! This will not work if you have a password set for root (which would probably be the case in a commercial environment, but not necessarily on a home machine). Now when you want to mount your floppy you simply have to type "pcfs", or "upcfs" to umount it, (the choice of pcfs & upcfs is just something I use because /pcfs is the mount point on my Sun at work, you can use any names you want). You can use the same technique to mount/umount your CD-ROM and FAT drives on your hard disk (assuming you have any). A further point to note is that the mount point directory (/A, /pcfs or whatever) doesn't have to be empty. If /A contains files and you mount the floppy on it, then cd to /A, you will see the flopy, not the hard disk. The hard disk files have not been deleted you've just mounted the floppy over the top of them, called over-mounting. When you umount the floppy you will see the hd files again. This is one feature of mount that can be very useful (and is, IMHO, a very serious omission from NT, which MS would have us believe is a UNIX-killer, ha bloody ha). Say you have the latest version of an application installed in /usr/bin/app, and you also have an old version of the same app in /usr/bin/old_app. You have all your paths, aliases, environment variables etc set up for the latest version. If you need to use the old version for any reason you can mount the old dir over the new one: mount /usr/bin/old_app /usr/bin/app Now when you run the app you will be running the old version. Umount /usr/bin/old_app and you are back to the latest version. -- Mark Ovens *====================================* CNC Apps Engineer | One of the main causes of the fall | Radan Computational Ltd | of the Roman Empire was, that | mailto:marko@uk.radan.com | lacking a zero, they had no way of | | indicating the successful | | termination of their C programs | *====================================* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?352B28B2.5BDE9363>