Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Feb 1999 17:29:05 -0500 (EST)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        ynelson@yahoo.com (Nelson Yu)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Tech Questions
Message-ID:  <199902202229.RAA15338@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <19990220173912.23514.rocketmail@send101.yahoomail.com> from Nelson Yu at "Feb 20, 99 09:39:12 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Nelson Yu wrote,
> As a root user, I was able to use shortcut !v for vi-editor I have
> used earlier for editing file, which I want to use !v to re-edit the
> same file without typing: vi filename.txt at the prompt.  As a user
> being a different login name, I wasn't able to do this.
> Which file should I edit and what do I add in so that I can do the !v
> shortcut command as a different user (not root)?

The use of '!<string>' to recall the last command you typed that
starts with '<string>' is part of the shell's history mechanisms. You
are probably using csh or tcsh, right? See 'man csh' for more
information about the history commands.

To give your other user the same shell as root, use 'vipw' as root to
change the shell of the user to the same one as root. The shell is the
last entry on the line. You could also use 'finger' to check root's
shell and then 'chfn -s <shell> [user],' where <shell> is the new
shell. The user can do this himself in which case the [user] argument
can be dropped. Root would need to add the user argument.

> And I want to download and upload files from a:\ floppy to my account,
> suppose I have a file hello.C, what command do I use?

If the floppy is MS-DOS formatted, as root,

# mount -t msdos /dev/fd0 /mnt
# cp /mnt/hello.C .

The first command mounts the disk. The second copies 'hello.C' to the
current directory. Remember to 'umount' the floppy before you remove
it.

> How do I do the same above as e:\cd-rom?

# mount -t cd9660 /dev/wcd0 /mnt
# cp /mnt/hello.C .

Same thing. This assumes your CD-ROM is IDE, not SCSI.

Both of the mounts can probably be done more easily since in the
default distribution of FreeBSD there are /etc/fstab entries for the
floppy and CDROM drives. 
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902202229.RAA15338>