Tip 2: Better "ls" command:
"ls" is used to list the contents of directories. Other Unix systems usually have a --color switch, but OS X's version of Unix doesn't. compiled this version which has the color switch. Download it here. Fire up the terminal program and unzip the archive by typing gunzip ls.gz Now you have a file called ls, rename it to ls2 (or whatever you like - eg. mv ls ls2). Make the file executable (chmod +x ls2). Then su to root (see Tip 1 ), or use sudo to copy the file ls2 to /bin/ls2 (cp ls2 /bin/ls2). Now you have to edit the file $HOME/.tcshrc (or $HOME/.bashrc if you're using the Bash shell). (For more info on where to put shell files for tcsh, see this file: "usr/share/tcsh/examples/README" - $HOME means "your home directory"). Try using a simple editor like "pico" if you're not an experienced Unix user (just type pico from a command prompt). Comment out the line that says alias ls 'ls-F', if there is one, and add a line that says alias ls /bin/ls2 --color ( I added -a as well, to see directories in the listing). The two lines should look like one of these, depending on your shell:
TCSH SHELL: BASH SHELL: #alias ls 'ls-F' #alias ls 'ls-F' alias ls '/bin/ls2 --color -a' alias ls='/bin/ls2 --color -a' The next time you login and do ls, you should have colored-coded output.
Last update 11-06-02