The rm command is not reversible.
The shell doesn't provide a Trash from where the deleted files and directories can be restored.
The option -i can be used to request confirmation before deleting a file or a directory.
Examples
Remove a file (see bellow the option -i to request confirmation before deleting the file):
Remove all files (excluding subdirectories and files starting with a period (.)) in the folder:
It may complain that there are subdirectories in folder1: "rm: folder1/folder11: is a directory".
Remove all files starting with a period (.) in a folder (excluding sub-directories).
It may show this warning: "rm: "." and ".." may not be removed".