Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Alternative to the rm Command in Linux

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

As is know to all, it can be dangerous to use the rm command directly in Linux/Unix. A simple idea is to define other commands/alias/script to replace it. For example, I have a shell script named trash which moves files (as input arguments) to the system’s Trash directory.

trash files_to_remove

Another even simpler way is to directly move files to the directory /tmp.

mv files_to_remove /tmp