alias
Just like the original developers of *nix, you too don’t want to be bothered with pesky characters and long strings of commands strapped together with pipes and redirects. Well, alias is about the best friend you can have.
The alias command works in both a temporary and a more permanent method. The permanent manner is a little deceiving as it really involves automating the entry of your alias commands when you log onto to a system.
First, the temporary method:
alias la='ls -ale'
Fairly painless, right? Here it syntax :
alias [your-cmd]=(')[*nix-cmd plus options](')
Enclosing the command string within single quotes ( shown above enclosed in parenthesise) is optional. Single quotes will preserver the commands as they are written with white-space. Use of double-quotes would allow for shell interpitation of the command string while respecting white-space within the string, and finally leaving the command unencolsed might just break the whole process and cause the system to catch fire and burn down the inter-web … or just fail perhaps with unexpected results.
So here is a useful example using alias and rsync:
Open Directory and .htpasswd
Fascinating! I worked on a project* once that involved a complete rewrite of the command-line utility passwd in order to keep a number of system services including a .htpasswd file in sync with users account passwords. Mac OS X Hints noted this is made simple with Mac OS X Leopard (10.5) and Open Directory.
Virtualized Xserver
Media Temple labs has a private beta for what it’s calling Xserve-Virtual . This system has been added quickly added to my MT wish list along with the Django GridContainer which, perhaps I wont need if I move over to a full-on-mirror of my development environment using a virtual OS X Server.
A virtual Mac OS X Leopard Server running on a fully loaded cluster of Xserves virtualized using Parallels Server . I want one, … or three, … yeah that should be enough …. maybe four, for symmetry.
Fedora 9 root password mismatch resolution
Having started my journey down the command-line with Fedora 3, I was excited to try out Fedora 9. The install completed with ease (the first time around) but once I logged onto the system and attempted to configure some of the system settings, my root password didn’t work.
Why? CAPS LOCK bit was set by default during the install process making a different root password.