rmw could have rm compatibility, rmw currently lacks -d, -i, -I and --one-file-system #305
Replies: 2 comments
-
@oyvindsaether , thank you very much for trying it out! :) rmw is not intended to be a drop-in replacement for rm. It's more closely related to the Desktop Trash system and it's goal is to match the Freedesktop Trash specification.
When rmw is used to "remove" a file, it does not permanently delete it, so prompting with '-i' or requiring '--force' isn't needed or desired, in my opinion. The purge feature, on the other hand, permanently removes files, that's why '-f' is tied to the purge feature. I actually have this line in my config file:
(force_required) commented out. So purge will run without me having to use '-f'. I have the 'purge_after' option set to 45, so I'm pretty confident that anything in the waste for that long I won't be afraid to lose.
rmw's behavior is much more closely related to that of the Desktop Trash than the 'rm' command. As a longtime user, I don't feel that rmw should try to be rm. I like that 'rm' is 'rm' and don't feel a need to truly replace it with anything. Although I understand that some people might like some alternative to 'rm'. 'rmw' isn't intended to be an alternative to 'rm', just a convenient extra utility for people who find it useful or meets their needs. Sometimes I want to just permanently remove files that I know I just want gone, not transferred to a Waste/Trash folder. And programs like 'make' use 'rm' in the background. When I use 'make clean' or 'make distclean', I know I wouldn't want all the files it removes to be transferred to my Waste folders instead.
Like the Desktop Trash system, 'rmw' won't move or copy files to a different file system or partition.
I appreciate your honest review! |
Beta Was this translation helpful? Give feedback.
-
@oyvindsaether, I finally realized that adding a '--one-file-system' option would likely be a good idea and created a ticket for it. Thank you for mentioning it. |
Beta Was this translation helpful? Give feedback.
-
The first question that came to mind when looking at rmw is:
Can it be used as a drop-in replacement for rm?
or put differently,
Can you set
alias rm='rmw'
and expect everything you'd be able to do withrm
to magically still work if you do that? The answer is that you can't because rmw doesn't support the options rm has. I think it should, but I'm not very important.That rmw -f is implemented as "allow purge to run" is a bit unfortunate since rm would read that as "ignore nonexistent files and arguments, never prompt".
I don't know if anyone else think's "full rm compatibility" is important, I think it would be cool.
I also miss a
--skip-waste
rmw option if rmw was to replace rm as there are some files (ie a 10+ GiB files) you wouldn't want moved from one partition to the partition where the waste folder resides. That's never a problem if you have rm and rmw as separate commands, but I'd be an issue if you make rmw a alias for rm.I'm just testing rmw for a K-pop news site that mentions GNU/Linux news and software sometimes, I'm not a long time user or anything, I've never tried it before I did just now.
Beta Was this translation helpful? Give feedback.
All reactions