[ale] alias? or script?

Charles Shapiro charles.shapiro at nubridges.com
Tue Jul 9 08:58:17 EDT 2002


Aliasing 'find' and other commands in /bin and /sbin inside your shell
poses another Great Spiritual Problem. You will have trouble remembering
the _real_ command syntax when you're logged in as root, or when you're
working on a strange box.  This can range from minor irritation to major
trauma, depending on how much pressure you're under at the time, and
what you're used to. Try working with four guys sitting within ten feet
at their dead terminals, watching you while you try to Fix the System.
Your blood pressure will be lower if you can effortlessly remember the
proper arguments to find(1) ('find startdir predicates actions', BTW).
The man(1) command is Your Friend.

I have a fairly extensive set of aliases and command-line shortcuts in
my .env file, but they're designed to _add_ functionality, not change
command names and syntax to what I prefer. Even then, I sometimes find
it awkward to work from an uncustomized shell. It's far better to learn
the default (universal) commands and syntax than it is to make up your
own peculiar idiom.

-- CHS

On Tue, 2002-07-09 at 06:36, Keith Hopkins wrote:
> Stephen Turner wrote:
> > hey say i wanted to do something like, 'find gzip /' i think thats the
> > order, anyways just as an example :-p but i wanted to like change the
> > word, find to search or what ever, some other word or letter combination
> > :-p do i do that in alias? or a script? like can i just say " alias search
> > = find" and everytime i type search it use the find command instead?
> > 
> 
> Ney, oh misguided one.  If though are really seeking to find files, "locate" is the command you seek.  Unless you are looking for something you just installed, then locate is a lot faster than find.
> 
> Otherwize, if you just wish to rename a command, then 'alias search="find"' works just fine.
> 
> Turn up the mantras.
> -- 
> Lost in Tokyo,
>    Keith
> 
> P.S. Writing a script to do the same will work, but it is slower because you add the overhead of forking a new shell for running the script itself.
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list