Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Apple Software > Mac OS X Forums > Mac OS X
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 13, 2009, 05:52 PM   #1
IslandRay
macrumors newbie
 
Join Date: Nov 2009
Location: Hawaii
-bash: alias ls: not found

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?
IslandRay is offline   Reply With Quote
Old Nov 13, 2009, 05:58 PM   #2
belvdr
macrumors 68030
 
Join Date: Aug 2005
Code:
alias ll='ls -la'
belvdr is offline   Reply With Quote
Old Nov 13, 2009, 06:39 PM   #3
sidewinder
macrumors 65816
 
sidewinder's Avatar
 
Join Date: Dec 2008
Location: Northern California
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-
__________________
Mac Pro: 8-core 2.8 GHz, 10GB RAM, Mac OS X 10.6.1; iPhone 3G S⃣ 32GB
sidewinder is offline   Reply With Quote
Old Nov 14, 2009, 04:57 AM   #4
IslandRay
Thread Starter
macrumors newbie
 
Join Date: Nov 2009
Location: Hawaii
-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

Last edited by IslandRay : Nov 14, 2009 at 05:03 AM.
IslandRay is offline   Reply With Quote
Old Nov 14, 2009, 12:05 PM   #5
dyn
macrumors regular
 
Join Date: Aug 2009
Quote:
Originally Posted by sidewinder View Post
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.
dyn is offline   Reply With Quote
Old Nov 14, 2009, 02:18 PM   #6
sidewinder
macrumors 65816
 
sidewinder's Avatar
 
Join Date: Dec 2008
Location: Northern California
Quote:
Originally Posted by dyn View Post
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-
__________________
Mac Pro: 8-core 2.8 GHz, 10GB RAM, Mac OS X 10.6.1; iPhone 3G S⃣ 32GB
sidewinder is offline   Reply With Quote

Reply

Mac Forums > Apple Software > Mac OS X Forums > Mac OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:06 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2002-2010, MacRumors.com, LLC