-filemask for rm & rmdir

Advertisement

Pavel
Guest

-filemask for rm & rmdir

Hi!
Scripting functionality will be more complete if you add an -filemask option for rm and rmdir commands.
Thanks in advance!

Reply with quote

Advertisement

Pavel
Guest

Re: -filemask for rm & rmdir

Pavel wrote:

I need something like rm *.7z<2016-10-28
...and it works!
Ok, and how to work with directories?
This is fails: rmdir *<2016-10-28

Reply with quote

martin
Site Admin
martin avatar

Re: -filemask for rm & rmdir

The rmdir does not support masks. But you can use the rm to delete directories too.

Reply with quote

Advertisement

pavel
Guest

Re: -filemask for rm & rmdir

Does rm supports a directory mask?
Something like rm */<2016-01-01 (this comman fails)

Reply with quote

martin
Site Admin
martin avatar

Re: -filemask for rm & rmdir

No the */ has different semantics here, than in a file mask.

But */<2016-01-01 works and will delete even the old folders (but files too).

Reply with quote

Pavel
Guest

Re: -filemask for rm & rmdir

Ok, I see two ways: first is to add a full support for a directory mask semantic in rm command, or second is to add a masks support for rmdir. The first in my opinion is more correctly, and the rmdir command is redundant.

Reply with quote

Advertisement

You can post new topics in this forum