Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

IslandRay

macrumors newbie
Original poster
Nov 13, 2009
2
0
Hawaii
I want to make some simple aliases for my terminal shell and I keep getting this error:

-bash: alias ls: not found

$ alias
$ alias ll
-bash: alias: ll: not found
$ alias ll 'ls -lrt'
-bash: alias: ll: not found
-bash: alias: ls -lrt: not found

how do you actually use alias?
 
I have these lines in my .bash_profile file:

alias x="exit"
alias l="ls -ahl"
alias c="clear"
alias less="less -cemiq"
alias k="kill -9 %1"

Those aliases come in handy.

S-
 
-bash: alias

Ah! Thanks. The = sign is what was eluding me.

The the sample .bash_profile will be helpful

Now the alias I really wanted:

alias rgrep="find . | xargs %1"

Thanks sidewinder and belvdr
 
alias x="exit"
alias c="clear"
You don't need those aliases when using bash. Ctrl-d is exit, ctrl-l is clear and there are many more. I find those much easier to use. They don't show up in the history which can be an advantage.
 
You don't need those aliases when using bash. Ctrl-d is exit, ctrl-l is clear and there are many more. I find those much easier to use. They don't show up in the history which can be an advantage.

Excuse me, you might not need those aliases, but I do.

I am well aware of those commands. You work in the terminal the way you want and I will work the way I want. I have been using Unix terminals in some form since 1981. I might actually have a clue.....

S-
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.