3
I hope this isn't too trivial, but for some reason I can't get a simple command to execute.
I'm writing a file manipulation script and I have several directories called test, test2, etc each containing several files.
I type:
rmdir --ignore-fail-on-non-empty test*
I get a prompt with no error messages as if the command executed cleanly. I ls
the directory I'm in and get:
test test2 test3 test4
I know I'm missing something obvious; anyone have a clue what it is? Yes, I'm in the parent directory. Yes, the option is typed correctly -- I checked the manpage twice.
Solved by doing
rm -r test*
but I still want to know what's wrong. :-) – Yitzchak – 2011-08-10T17:22:48.523Does running it with --verbose shed any light on the situation? – EBGreen – 2011-08-10T17:22:53.063
if you want to ignore failing on empty, why not rm -rf test*? (edit: nevermind, you just commented about having fixed it) – EricR – 2011-08-10T17:22:57.150
@EricR Why f? Doesn't the f option go up? I don't think I'd want that. – Yitzchak – 2011-08-10T17:24:55.353
@Yitzchak "-f ignore nonexistent files, never prompt". afaik there's no option to ascend with rm. – EricR – 2011-08-10T17:26:08.737
@EricR, right you are. I guess I'll remember the rest of the manpage now. – Yitzchak – 2011-08-10T18:34:59.093