Examples of tzsh

Please view the tzsh.man file for a general overview of the commands available. Please download the commands manuals by installing the manpages, setting the environment variable MANPAGES to point to this directory (see tzsh32.prf for an example). Then simply type 'man the_command_to_see' where 'the_command_to_see' is simply the name of the command, e.g. 'man ls' for a complete manual on this command.

Note that tzsh does not support ALL of the options, usually each command will report it's usage through the '-?' parameter, e.g. 'ls -?' (not all commands do this). If you're not sure just try it out and see.

Additionally, some commands have been added to help enhance the 'UNIX on Windows experience', e.g. the 'hear' command which plays .wav files, or the 'backdrop' command which changes your Windows wallpaper. These commands may or may not have an equivalent in specific UNIX implementations but are provided in tzsh for your enjoyment.

All commands may be scripted in shell scripts, see the etc directory for some examples, e.g. how to implement a windows wallpaper picture changer using shell scripts.

Go to specific example

pwd, ls, and df commands
cd command
ps command

pwd, ls and df commands

Output from pwd (print working directory), ls (list files) and df (report number of free disk blocks) commands.
ls and df

It's my D drive, as you can see from the 'pwd' and yes, the main partition on my hard disk is named after the Battlestar Galactica.

cd command

To change drives you need to specify using full paths, e.g. 'cd d:' or 'cd d:/mypath/mysub'. To change directories on the current device you may use absolute or relative paths e.g. 'cd mydir' for a directory a level down, 'cd /mydir' for a directory on the root or 'cd ..' for the parent directory or 'cd ../anotherdir' for a directory on the same level and on the same parent etc. In addition you do not need to type the entire path, just enough to make it unique is enough if you follow with a '*' e.g. 'cd mylongdirectoryname' is the same as 'cd mylo*' if 'mylo' is enough to make it a unquie name on that level, 'cd m*' would be enough if there were no other directories or files with a name starting with 'm'. 'cd -' changes to the previous directory.

ps command

Typical output from a 'ps -e' command. 'ps' alone will display processes executing within the environment (experiment the 'notepad' and 'notepad&' to see this difference).
ps

The command 'ps -ef > myout' would have put the output of this command into the file 'myout'. Almost all commands support input and output redirection through a file specification, through '<' or through '|', depending on what is appropriate.

The above example screen also shows the windows toolbar which includes font and mark/copy/paste buttons which all work in the shell environment. These can be switched off, see next example screen. You can also do many other useful short cut functions like drag and drop from explorer into the shell if need be.

You should note that both forward '/' and backward '\' slashes are supported for directories from user input, and that tzsh always displays '/' as the separator in outputs (unless you've specifically used otherwise).

Back to main tzsh page


Home