rm redirection code