[EMAIL PROTECTED] wrote:
>
> So, forgive for being a perpetual newbie.....
>
> 1) I know there are startup files for each user, a generic startup file for
> any user (and probably more) but what are the file names and where are they
> located. Is there a "howto" for these?
The user startup scripts are called .profile, and they
are in the user's home directory, ie /root/.profile
The system-wide login script is /etc/profile
> 2) I would also like to make some of my own little script files. I get
> tired of:
>
> mkdir /mnt/floppy
> mount -t msdos /dev/fd0 /mnt/floppy
> mkdir /mnt/flash
> mount -t msdos /dev/fla1 /mnt/flash
>
> Because ultimately, I will reboot to try some changes and then have to
> enter them again. Normally, I run without the floppy attached unless I
> need to experiment. So when I attach a floppy, I would like to issue a
> command to perform the mounting.
>
> Thanks all.
Ok, here's how it's done in /etc/profile, to make a few
aliases that help a lot!
---------------------------------------------
#!/bin/sh
# there's more stuff here I left out.
# the aliases and the one shell function are the
# only intersting parts for this post....
alias l='ls -l'
alias ll='ls -al | more'
alias cls='clear'
alias msl='more /var/log/syslog'
alias tsl='tail -f /var/log/syslog'
alias m2='mount -t msdos /dev/fd1u1680 /mnt'
alias mboot='mount -t msdos /dev/fd0u1680 /mnt'
alias uboot='umount /mnt'
alias vpf='vi /usr/local/bin/pfw'
alias vpo='vi /usr/local/etc/popts'
alias vpfu='vi /usr/local/etc/pfuncs'
alias vpv='vi /usr/local/etc/pvars'
help () { more /var/lib/lrpkg/${1}.help ;}
----------------------------------------------------
In the above example, the aliases allow you to just type
commands simply, ie.
mboot <Enter>
and the system will mount the floppy. The last example is the
help() shell function I wrote. What that does is gives me a help
command the same way I have an mboot command, but this one does
more in that it handles command line arguments. ie. At the command
prompt, I need to read the quick help on ssh. So I would type
help ssh
in order to launch the shell function help() with "ssh" as the
first argument, $1. The shell function, help(), runs and executes
the following command:
more /var/lib/lrpkg/ssh.help
Good Luck,
Matthew
_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user