[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] RE: Aliasing a command



On Friday 7/19/02 at 15:03 Parker Morse asked;
|>(BTW, on my very first university unix account, I had aliased
|>"ls" to mean  "ls -l", because I seldom have much use for a plain ls.
Of
|>course, I've forgotten how I did it. Can anyone clue me in on that?)

Certainly, and happily supplied.
In your home directory (if it isn't already there, and I believe by
default it isn't) create a file called .profile. chmod it to at least
700, but little further. It's a core file and should be rwx only to you.
If there's nothing else whatsoever in that directory, (and there should
be, but that's a subject for a whole tutorial which is utterly beyond
the scope of your question) this should exist in order to create what it
is you seek...please note that this is an example only:

#all other desireable aliases
alias ls="ls -laF |less"
alias lo="logout"
alias pine="pine -d0"

After creation, reload the .profile by typing (while in your home
directory) at the command line:

~> . .profile

Now that's "dot" [a-space-NOT-a-tab] "dot-profile"

Now do an "ls" at the command line and see if you get the results you
are looking for.

Contact me offlist if you would like a sample (but edited to protect
machine -specific references) .profile. Which I might add, is only a
starting point, and can be built upon almost indefinitely until it fits
you like the proverbial glove)

Regards,
-Colin
--
Colin J. Raven
http://www.haggis.nl/~duiker
Home of the Cobalt "Slam Dunk of the Week Award"