Cu

From Secure Computing Wiki
Jump to: navigation, search

cu Commands

The cu program provides several commands that may be used during the conversation. The commands all begin with an escape character, which by default is '~' (tilde). The escape character is only recognized at the beginning of a line. To send an escape character to the remote system at the start of a line, it must be entered twice. All commands are either a single character or a word beginning with '%' (percent sign).

The 'cu' program recognizes the following commands.

'~.'

  • Terminate the conversation.

'~! command'

  • Run command in a shell. If command is empty, starts up a shell.

'~$ command'

  • Run command, sending the standard output to the remote system.

'~| command'

  • Run command, taking the standard input from the remote system.

'~+ command'

  • Run command, taking the standard input from the remote system and sending the standard output to the remote system.

'~#, ~%break'

  • Send a break signal, if possible.

'~c directory, ~%cd directory'

  • Change the local directory.

'~> file'

  • Send a file to the remote system. This just dumps the file over the communication line. It is assumed that the remote system is expecting it.

'~<'

  • Receive a file from the remote system. This prompts for the local file name and for the remote command to execute to begin the file transfer. It continues accepting data until the contents of the 'eofread' variable are seen.

'~p from to' or '~%put from to'

  • Send a file to a remote Unix system. This runs the appropriate commands on the remote system.

'~t from to' or '~%take from to'

  • Retrieve a file from a remote Unix system. This runs the appropriate commands on the remote system.

'~s variable value'

  • Set a `cu' variable to the given value. If value is not given, the variable is set to `true'.

'~! variable'

  • Set a `cu' variable to `false'.

'~z'

  • Suspend the cu session. This is only supported on some systems. On systems for which `^Z' may be used to suspend a job, `~^Z' will also suspend the session.

'~%nostop'

  • Turn off XON/XOFF handling.

'~%stop'

  • Turn on XON/XOFF handling.

'~v'

  • List all the variables and their values.

'~?'

  • List all commands.