|
|
Dramatically reduce the CPU usage of 'top'
robg says that he aliased top to ttop so he can use both commands easily. On the contrary, I think this is cumbersome. You have to memorize new names for commands. You can use the same name and still be able to run it without the alias just as easily. All you have to do is escape the command. You do this simply by putting a backslash in from of the command. Doing this causes aliases to be ignored. Observe:
I only make other names for commands when I like to occassionally run the commands in different ways. For example, my .aliases file contains:
While I'm talking about aliases, here's another tip. Use \!* when you want to insert arguments supplied to an alias in a specific place. For example, I have this alias for my xemacs command:
This allows me to make a call like `xe myfile.txt` and the alias puts the "run in the background character: '&'" at the end of the command. I suppose this is probably all stuff a lot of you already know. If so, give me a break. I've been couped up in my apartment too long with a sinus and ear infection. I'm going stir crazy. :o) Rob
Dramatically reduce the CPU usage of 'top'
One big potential problem with doing this is what if a script or application tries to use the command without using its entire path. Yeah yeah I know you should always use the entire path of a command in a script or application but sometimes programmers take shortcuts.
Dramatically reduce the CPU usage of 'top'
True, but generally, shell scripts should be writtin in the basic /bin/sh (bourne shell) as this is the only shell pretty much always going to be there and a lot less susceptible to modification from the global environment.
Dramatically reduce the CPU usage of 'top'
True, writing shell scripts, you should use /bin/sh |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|