On 2018-09-10, Mark Phillips <[email protected]> wrote:
> I have busybox running Ubuntu on a Samsung tablet (https://userland.tech/).
> I have git setup to retrieve some of my code repositories. I tried a git
> clone with an typo in the name of the repository, so none of the code was
> downloaded, but git did create a directory foo with a .git directory
> underneath it. I managed to download the correct repository after fixing
> the typo.
>
> However, I cannot remove the directory foo. I have tried
>
> rm -r -f -d foo/

Busybox rm has no -d.  Didn't you get `rm: invalid option -- 'd''
error?  If you didn't you might not use busybox.  Try `busybox rm -r
-f -d foo' and you should get the error.

> rmdir foo/

It won't work.  Both GNU coreutils and busybox implementations of
rmdir will remove target directory only if it's empty.  It's also
specified by POSIX:
http://pubs.opengroup.org/onlinepubs/000095399/functions/rmdir.html

> git rm -rf foo/

git is not a busybox command.

> I even tried sudo rm.... and that did not work.
>
> The error message in all cases is
> rm: cannot remove 'foo'/.git: Directory is not empty.
>
> However, there is nothing in the foo/.git directory.

Do you try to remove foo or foo/.git?

> I tried the all same commands on foo/.git, with the same results.
>
> Am I missing something?

Probably yes.  The -d you used with rm is probably unneeded.  Try:

rm -rf foo

-- 
Arkadiusz Drabczyk <[email protected]>

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to