Custom console commands

Is it possible to create new commands that would basically be renamed old commands with special parameters? I always keep forgetting some of those, like rpm -Uvh (should be rpminstall or something), ln -s (should be symlink) etc. I guess I would need to put something in /usr/bin?

Hi
Have a look at the man page for alias :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 2.6.27.7-4-default
up 0:10, 2 users, load average: 0.06, 0.32, 0.30
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

Malcolm wrote:
>

> Hi
> Have a look at the man page for alias :wink:
>

alias is a Bash builtin command. See ‘help alias’
But aliases will be deprecated, better use functions instead.
In your .bash_profile put e.g.
rpminstall () { test -n $1 && rpm -Uhv $* || echo “Usage: rpminstall <file.rpm> [file2.rpm] …]”; }
symlink () { ln -s $1 $2; }

Of course you could always use ‘apropos’ or ‘man -k’ keyword if you forgot a command, or read the man-page if you forgot
the parameters.