From owner-freebsd-newbies Wed Apr 8 00:47:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA11175 for freebsd-newbies-outgoing; Wed, 8 Apr 1998 00:47:40 -0700 (PDT) (envelope-from owner-freebsd-newbies@FreeBSD.ORG) Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id AAA11156 for ; Wed, 8 Apr 1998 00:47:35 -0700 (PDT) (envelope-from marko@uk.radan.com) Received: from radan.demon.co.uk ([158.152.75.22]) by post.mail.demon.net id aa2018658; 8 Apr 98 7:36 GMT Organisation: Radan Computational Ltd., Bath, UK. Phone: +44-1225-320320 Fax: +44-1225-320311 Received: from beavis.uk.radan.com (beavis [193.114.228.122]) by uk.radan.com (8.6.10/8.6.10) with SMTP id IAA03522; Wed, 8 Apr 1998 08:35:23 +0100 Received: from uk.radan.com (gppsun4) by beavis.uk.radan.com (4.1/SMI-4.1) id AA04684; Wed, 8 Apr 98 08:35:21 BST Message-Id: <352B28B2.5BDE9363@uk.radan.com> Date: Wed, 08 Apr 1998 08:35:14 +0100 From: Mark Ovens Organization: Radan Computational Ltd X-Mailer: Mozilla 4.03 [en] (X11; I; SunOS 4.1.3_U1 sun4m) Mime-Version: 1.0 To: "Michael P. Sale" Cc: freebsd-newbies@FreeBSD.ORG Subject: Re: mtools use References: <01bd6296$aece1600$5006bccc@708644668> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 -l root "mount -t msdos /dev/fd0 /A" alias upcfs rsh -l root "umount /A" where 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