Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

Predefined aliases

Oregon Coast

Predefined aliases
Previous | Next

These aliases are predefined in the default startup.csh.

Alias Definition Function
app cat >>

Append to a file.

assoc cmd /c '"assoc ^!^*"'

List file associations.

beep eval echo -n ^a

Beep sound.

breaksw break

Older BSD 4.3 name for a break statement inside a switch.

cdd cd +c

Change the directory and disk in one command.

copy local s; @ s = $nowild; @ nowild = 1; safecopy

Invoke the standard Windows copy command with shell wildcarding turned off so copy will work sensibly.

date dt

Display the current time and date using the date utility, stored as dt.exe.

del local s; @ s = $nowild; @ nowild = 1; safedel

Invoke the Windows del command with shell wildcarding turned off so del *.* will still produce the “Are you sure?” message.

di diff -b!

Run the diff command, ignoring white space differences and using color to highlight the changes.

dir cmd /c dir

Invoke the cmd.exe dir command processor. (Alternately, you may wish to intercept dir the same way copy or del are done, turning off shell wildcarding before running the command.)

duc du -c

Disk usage for the current disk only.

dumphist history -s > ~\history.csh

Dump out the history list.

endif end

Older BSD 4.3 name for the end of an if statement.

endsw end

Older BSD 4.3 name for the end of switch statement.

erase del

Alternate name for del.

f fgrep

Quicker name for fgrep.

fi fgrep -i

fgrep case-independent.

fn fgrep -n

fgrep and print line numbers.

ftype cmd /c '"ftype ^!^*"'

List file associations.

g grep

Quicker name for grep.

gi grep -i

grep case-independent.

gvim env -D SHELL= gvim.exe

Delete the SHELL variable from the environment passed to the graphical version of the Vim editor editor. Vim only knows how to pass commands to cmd.exe.

h history

Quicker name for history.

help

A procedure using winerror (in the samples directory) to print the message corresponding to the return code from the last command.

home cdd ~

Change to the home disk and directory.

killp kill -x! ^`pss ^!^*^`:0

kill any matching processes.

label hlabel

Read/write the volume label.

ld ls -a +D -.

List only the subdirectories.

ldr ls -Ldr

List recursively by date

ll ls -L

List directories, long format.

loadhist source -n ~\history.csh

Load the history list without executing any of it.

md mkdir

Make directories.

mi more -i

Quick interactive startup of your favorite version more. Clears the screen when it starts up and doesn't just exit if there's less than a screenful.

more hmore

Hamilton more utility, stored in hmore.exe.

pause echo -n Press any key when ready ...; @ getchar; echo

Pause, waiting for any keystroke or character from stdin.

po popd

Pop the directory stack.

pss ps -s | fi ^!^*

List any matching processes.

pu popd

Push the directory stack.

q exit

Exit the C shell

rd rmdir

Remove empty directories.

ren rename

Another name for the rename alias.

rename local s; @ s = nowild; @ nowild = 1; saferename

Invoke the standard Windows rename command with shell wildcarding turned off so the rename will work sensibly.

rm hrm

Hamilton rm utility, stored as hrm.exe.

ro rotd

Rotate the directory stack.

rot13 tr 'n-za-mN-ZA-M'
'a-zA-Z'

Encoder/Decoder for off-color jokes on Internet.

sort hsort

Hamilton sort utility, stored as hsort.exe.

start env -N

Start a command in a new window.

su env -D LAYER= su.exe

Delete the LAYER variable from the environment passed to su so the prompt doesn't look like a subshell with a layer number.

sudo su -.

sudo wrapper to su.

type cat

Copy files to stdout.

uud uudecode

uudecode binary data.

uue uuencode -c

uuencode using cp-style syntax.

vim env -D SHELL= vim.exe

Delete the SHELL variable from the environment passed to the Vim editor. Vim only knows how to pass commands to cmd.exe.

vol vl

List volume labels.

w (wait; beep)

Wait for background processes and beep.

xcopy local s; @ s = nowild; @ nowild = 1; safexcopy

Invoke the standard Windows xcopy command with shell wildcarding turned off so xcopy will work sensibly.

Previous | Next

Getting started with Hamilton C shell

Hamilton C shell, as it first wakes up.

Getting started with Hamilton C shell

A first few commands.

You can set the screen colors to your taste.

You can set the screen colors to your taste.