You really meant to type local instead of locak, and you want to fix your typo without retyping the last part of the command. Commandline editing allows you to use the left and right arrow keys to move back to the part of the commandline you want to fix, and edit it. By default, tcsh uses the emacs-style keybindings. Some useful basic keybindings:tcsh> ls /usr/locak/bin
tcsh> bindkey -v
Now, if you want to look at the ~/tmp directory again to see what files remain, you needn't type the first command again. Instead, hit the up-arrow twice to get back to the original command, and hit enter to execute it again. (The keybindings for the history mechanism are also configurable; see description of the "bindkey" command on the tcsh manpage.)tcsh> ls -l ~/tmp tcsh> rm ~/tmp/clipboard
If you want to remove the file without typing the whole filename, you can use file completion. Simply type rm sup and then hit the tab key. tcsh looks for a filename starting with sup and completes the filename for you. You commandline now looks like this:tcsh> ls -1 superman suroth
Now you can hit return to execute the command. If, however, you'd just typed rm s before hitting tab, it would have been expanded into rm su followed by a beep. tcsh is telling you that more than one filename starts with su, and it has no unique completion to give you. At this point you can type more letters to make it unique and then hit tab again.tcsh> rm superman
You want to remove all the files which start with get except for get-modules. The easiest way to do it would be to get tcsh to expand the filenames for you, and then use commandline editting to remove the one you don't want to delete. So, you type the following:tcsh> ls -l -rw------- 1 roth student 2537 Jan 23 17:12 etherpower-info -rw------- 1 roth student 2609 Jan 29 03:42 get-fdisk -rw------- 1 roth student 2081 Jan 19 21:30 get-libgr -rw------- 1 roth student 1976 Jan 29 03:46 get-modules -rw------- 1 roth student 2934 Jan 29 03:43 get-mtools -rw------- 1 roth student 0 Feb 5 19:08 get-netscape -rw------- 1 roth student 30848 Jan 31 01:05 www
Now you type CTRL-X, followed by the * key. This causes tcsh to expand the glob for you. Your command line now looks like this:tcsh> rm get*
Your cursor is positioned at the end of the line. Now you can use commandline editting to go back into the line and delete get-modules. Your line will look like this:tcsh> rm get-fdisk get-libgr get-modules get-mtools get-netscape
Hitting enter will execute the command, and you've just saved a lot of typing!tcsh> rm get-fdisk get-libgr get-mtools get-netscape