OpenWindows Advanced User's Guide

7.9 Tilde Commands

In the course of composing a letter, you can use tilde commands to perform a variety of functions. Tilde commands usually consist of the tilde character (~) followed by a single character. The following table describes some of the more useful tilde characters. Some of these have already been introduced in this chapter.

Note -

If you want to include a literal tilde character in a letter, type two tildes in succession. Only one tilde will be displayed.

Table 7-2 Tilde Commands (mailx)




Escapes to a shell command 


Simulates pressing Ctrl-D to mark end of file 


Lists a summary of tilde commands 

~b username

Adds user name(s) to the blind carbon copies (Bcc:) list 

~c username

Adds user name(s) to the carbon copies (Cc:) list 


Reads the contents of the dead.letter file into current letter.

~f number


Forwards the specified letter. Valid only when sending a message while reading mail. 


Prompts for header lines: Subject, To, Cc, and Bcc. 

~m number


Inserts text from the specified letter into the current letter. Valid only when sending a message while reading mail. 


Prints the message being entered to the screen. 


Simulates pressing Ctrl-C twice. If the body of the current message is not empty, the contents are saved to dead.letter.

~r filename

Reads in the text from the specified file. 

~s string

Changes the subject line to string.

~t name

Adds the specified name(s) to the To list. 

~w filename

Writes the current letter without the header into the specified file. 


Exits mailx. Similar to ~q except message is not saved in the dead.letter file.