Greg Hinkel's UNIX Tip of the Week for May 26, 1996
Individual Startup Files (*rc* files).
First, what are "startup" files?
Many programs in the UNIX environment will look for and read a "startup" file
each time the program is invoked. These startup files can be customized by
each user so that that user can use the program more efficiently. For example,
C Shell users can have a file named ".cshrc" in their home directory. If that
file exists, then each time that user invokes the C Shell (/bin/csh), the file
.cshrc will be read and executed by /bin/csh. This makes it easier for the
user to use commands, aliases and/or shortcuts that he/she uses freqeuntly.
Similarly, many other programs allow users to have "startup" files. The "vi"
editor looks for a file name ".exrc" which specifies commands and/or key
mappings for use within the vi editor.
Most of these startup files are placed in your home directory and usually begin
with a "dot" (or period) and end with "rc"
So, how do you know what programs read which files?
A customer once asked me if I could provide him with a list of all startup
files and the parameters that can be set/manipulated in those files. Well,
this is actually impossible (for all practical purposes) because the startup
files are "program dependent" and the list of programs grows daily. The best
way to find out if a program allows a startup file, the name of that file, and
what you can put into that file, is to look at the documentation for that
program. This is usually done with the "man" command (or other on-line
help). The manual page will typically list the options, commands, and/or
mappings that can be set/manipulated for that program. Looking at the man
page for "mail" will tell you that "mail" looks for a file named .mailrc in
your home directory. You can put things like the following in your .mailrc
file
set crt=20
set record='/usr/spool/mail/hinkelg'
set folder=mail
set autoprint
set askcc
alias sheila sfrankl@moses.genesis.xyz.com
alias oper operator@cons.ornl.gov oper_boss@cons.ornl.gov
That way you have the same "mail environment" each time you invoke mail.
So, if you use a program frequently, look at the documentation for that
program (whether it's a standard UNIX command, free software, or some third
party application) and see if it looks for a startup file.
Previous Tip of the Week ·
Next Tip of the Week ·
Index
Greg's Home Page
Greg Hinkel / (hinkelgc AT ornl.gov)
Last Modified: Friday, 02-Sep-2005 12:53:05 EDT
Visitors: 4801 since March 18, 1996