Show/Hide Toolbars

Take Command / TCC Help v. 21

Navigation: TCC > Commands


Scroll Prev Top Next More
Purpose:Remove aliases from the alias list


Format:UNALIAS [/Q /R file... (alias ...)] alias...




aliasOne or more aliases to remove from memory.
fileOne or more files from which to read the aliases to be undefined.



See also: ALIAS and ESET.




TCC maintains a list of the aliases that you have defined. The UNALIAS command will remove aliases from that list. UNALIAS supports wildcards in the alias name.


For example, to remove the alias DDIR:


unalias ddir


To remove all the aliases:


unalias *


To remove all the aliases that begin with "DD":


unalias dd*


You can delete all matching aliases except for those specified by enclosing the exceptions in parentheses. For example, to remove all aliases beginning with "a" except for alias1 and alias2:


unalias (alias1 alias2) a*


If you keep aliases in a file that can be loaded with the ALIAS /R command, you can remove the aliases by using the UNALIAS /R command with the same file name:


unalias /r alias.lst


This is much faster than removing each alias individually in a batch file, and can be more selective than using UNALIAS *. UNALIAS /R accepts all of the alias definition formats you can  use  in a file for ALIAS /R.




/QPrevents UNALIAS from displaying an error message if one or more of the aliases does not exist. This option is most useful in batch files, for removing a group of aliases when some of the aliases may not have been defined.


/RRead the list of aliases to remove from a file. The file format should be the same format as that used by the ALIAS /R command. You can use multiple files with one UNALIAS /R command by placing the names on the command line, separated by spaces:


unalias /r alias1.lst alias2.lst


UNALIAS /R will read from stdin if no filename is present and input is redirected.