Previous Topic: rem-client Command--Remove the Autoshell Client from a Remote Windows System (Funclet)Next Topic: run-client Command--Run the Autoshell Client on a Remote Windows System (Funclet)


rmdir Command--Remove Directory (Funclet)

This command removes a directory. The specified directory must be empty and must not contain files or subdirectories. To specify a remote host, prefix the pathname with the hostname followed by two colons (::). The operation is performed through SFTP. Thus the remote system does not necessarily have the client AutoShell installed, an SSH server with SFTP access is sufficient.

The command has the following syntax:

rmdir d [-silent] [-user username] [-pass password] [-key key phrase] [-port portnumber]
d

Defines the name of the directory to remove. To specify a remote host, prefix the pathname with the hostname followed by two colons (::). The operation is performed through SFTP. Thus the remote system does not necessarily have the client AutoShell installed, an SSH server with SFTP access is sufficient. You can write the output to a file using the set alternate command.

-silent

(Optional) The command suppresses any output to stdout.

-user username

(Optional) Specifies the user name to log in to the remote node. A user name is required for password or public key authentication. If no user name is specified, the user name entered during AutoShell login is used. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses.

Default: $$User

-pass password

(Optional) Specifies password to use to log in to the remote node. If no password is specified, the password entered during AutoShell login is used. To enter a hidden password after issuing this command, specify PW_GET() with an optional prompt as argument. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses.

Default: $$Pass

-key key

(Optional) Specifies an absolute or relative path to a file containing a private RSA key to use to log in to the remote node. If a private key and a password are specified, AutoShell attempts a public key logon first, and if that fails, a password logon. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses. This parameter is only required when creating an SSH session on the fly using public key authentication.

Default: ""

phrase

Specifies the passphrase for a private key. If the key is not encrypted, the phrase is not required. To enter a hidden password after issuing this command, specify PW_GET() with an optional prompt as argument. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses.

Default: ""

-port portnumber

(Optional) Port on which to connect to the target system.

Default: SSH standard port 22.

Examples

Remove the directory c:\temp:

rmdir c:/temp

Remove the directory temp as subdirectory of current working directory, but suppress any output to stdout:

rmdir temp -silent

Remove a directory from the remote system ascl1:

rmdir ascl1::/home/alice/data

See also:

cd, chdir Commands--Change Directory (Cmdlet, Funclet)

mkdir Command--Create a Directory (Cmdlet)

pwd Command--Print Name of Working Directory (Cmdlet)

del, rm Commands--Delete Files (Funclets)

dir, ls Commands--Get File and Directory Information (Funclets)