Is there any way to disable commands switches/options of rm commands

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux(RHEL)

Issue

  • Is there any way to disable commands switches/options of rm commands

Resolution

  • You can't disable a specific options from a command.
  • If you want so then you have to disable the "-r" and "-f" options from the "rm" source code and would have to recompile the rm command but it will be unsupported.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.