The “rm” command
Use this command to delete one or more files or directories.
Include one or more instances of the
<FILE> variable, separating
each with a whitespace, and set it to the complete path to be deleted. Each
<FILE> variable can be either
of the following:
- End with a directory: This will delete it, as well as all of its associated contents. (This includes all sub-directories and file contents)
- End with a specific filename: This will delete an individual file.
rm <OPTION>... <FILE>...
In this example, a single file, as well as a complete directory are targeted for deletion:
rm --interactive /123456/test/movie_old.mp4 /123456/old/
<OPTION>” variable displayed in the above example can be populated with any of the following options:
||This is applicable if you
have defined a list of separate
||Ask before removing files.|
||This option performs a "quick-delete" to remove content recursively.|
||Display the operation’s execution step by step.|
||Display help information for this command.|
-r, quick-delete must be enabled.
y” or “
Y”, otherwise the file will be skipped.