|
#1
| |||
| |||
| simplifying commands? I was wondering how to go about simplifying my most used commands. Basically if I want to run a command like Code: ls -a -s -l Code: list |
|
#2
| ||||
| ||||
| use the "alias" shell builtin. So, by making a file in your home dir called .bash_profile, and putting lines in it like alias list='ls -a -s -l' you can save some typing Incidentally, that file is only read once when bash starts, so that will apply only to terminal windows opened since you change the file
__________________ What is the robbing of a bank compared to the founding of a bank? -- Bertold Brecht |
|
#3
| |||
| |||
| thanks That was exactly what I was looking for! ![]() By the way what other types of entries can I put in the .bash_profile? Last edited by tk4two1; March 3rd, 2004 at 05:55 PM. |
|
#4
| |||
| |||
| Pretty much anything you can write on the command line, I believe. Oh, by the way ls -a -s -l can also be written ls -asl
__________________ =) <>< public key id: EE4B2E09 |
|
#5
| ||||
| ||||
| Yes, you can put anything you want in there - it's just a script that gets run whenever the shell starts. I don't actually use bash - I got set in my ways in OS X PB - 10.2 where tcsh was the default shell. I decided to try bash for a while, and made this bash_profile before I got fed up with it: Quote:
__________________ What is the robbing of a bank compared to the founding of a bank? -- Bertold Brecht |
![]() |
| Thread Tools | |
|
|