rm

Syntax

rm(filename)

Parameters

filename is the path and name of the file to be deleted.

Details

Delete a file specified by path and name. It must be executed by a logged-in user.

Examples

files("/home/test");
filename isDir fileSize lastAccessed lastModified
abc.txt 0 15 2017.06.05 08:09:47.443 2017.06.05 07:24:19.999
dir1 1 0 2017.06.05 08:06:44.836 2017.06.05 08:06:44.836
dir2 1 0 2017.06.05 08:06:42.210 2017.06.05 08:06:42.210
dir3 1 0 2017.06.05 08:06:39.597 2017.06.05 08:06:39.597
rm("/home/test/abc.txt");
// delete file abc.txt
files("/home/test");
filename isDir fileSize lastAccessed lastModified
dir1 1 0 2017.06.05 08:06:44.836 2017.06.05 08:06:44.836
dir2 1 0 2017.06.05 08:06:42.210 2017.06.05 08:06:42.210
dir3 1 0 2017.06.05 08:06:39.597 2017.06.05 08:06:39.597