rm command

Removes one or more remote files.



rm <file> [ <file2> ... ]


If remote recycle bin is configured, moves file to the bin instead of deleting it. Filename can be replaced with wildcard to select multiple files.

Can remove non-empty directories recursively.

Effective options: failonnomatch

XML log element: rm


rm index.html
rm index.html about.html
rm *.html


Converting to .NET Assembly

When converting script to .NET Assembly, map rm command to Session.RemoveFiles method.

Parameters mapping: Command parameter file maps to method parameter path. When multiple file parameters are used, you need to call Session.RemoveFiles multiple times. You have to convert relative paths to absolute paths.

For example, following script snippet:

cd /home/martinp/public_html
rm index.html about.html

maps to following PowerShell code:


Last modified: by martin