-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make sure that a file is deleted with one command? #866
Comments
Thank you for raising this issue. |
Thank you for raising this enhancement request. |
We could add an ignore/suppress errors option for delete operations. |
Implement as new flag and only detect that files not there as a success. |
Suggesting adding a This would be for delete ops for DS, USS, zFS, and maybe VSAM. |
I am trying to delete a file that may not exist.
In Linux, I would use
rm -f /tmp/may-not-exist
and that would either delete it if it is there or not delete without any error message and error code if it is already deleted.The man page of
rm
says:This is a useful option because I do not need to check if the file is deleted before I am deleting and it leads to simple and more stable automation (because the file can be deleted outside of my script after the check).
The Zowe CLI has
-f
option that has a different meaning. If the file does not exist, Zowe CLI fails with an error.It would be useful to have a similar option
-f
as Linuxrm
has so it returns 0 when the file does not exist.The current behavior is:
The text was updated successfully, but these errors were encountered: