Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I remove a non-empty directory with smbclient? I have tried the following:

1) rm

Result:

NT_STATUS_NO_SUCH_FILE listing [dir_path]

2) recurse;rm

Result:

No Error but also nothing happens! The folder remains as before!

3) rmdir

Result:

NT_STATUS_DIRECTORY_NOT_EMPTY removing remote directory file [dir_path]

4) recurse;rmdir

Result:

NT_STATUS_DIRECTORY_NOT_EMPTY removing remote directory file [dir_path]

5) rm [dir_name]/*;rmdir [dir_name]

Result:

NT_STATUS_OBJECT_NAME_NOT_FOUND deleting remote file [sub_dir_path]

NT_STATUS_DIRECTORY_NOT_EMPTY removing remote directory file [dir_path]

6) recurse;rm [dir_name]/*;rmdir [dir_name]

Result:

NT_STATUS_OBJECT_NAME_NOT_FOUND deleting remote file [sub_dir_path]

NT_STATUS_DIRECTORY_NOT_EMPTY removing remote directory file [dir_path]
share|improve this question
    
What have you tried so far? –  Mat Feb 23 '13 at 10:49
    
1) rm 2) recurse;rm 3) rmdir 4) recurse;rmdir 5) rm dirname/*;rmdir –  mor Feb 23 '13 at 11:40
    
Please edit your question to show exactly what you tried, and the errors you got (if any). Don't put that information in comments please. –  Mat Feb 23 '13 at 11:40
    
OK, I found a workaround: Mounting the remote windows share folder to a local directory and then doing "rm -r" Thanks to Mikhail who gave the hint here –  mor Feb 24 '13 at 8:12
    
This question was on stackoverflow, and the interesting answer stackoverflow.com/a/15025524/2996931 –  shgurbanov Feb 2 at 18:15

1 Answer 1

From OP's comment:

OK, I found a workaround: Mounting the remote windows share folder to a local directory and then doing "rm -r" Thanks to Mikhail who gave the hint here – rahimi 2 days ago

With this, the question is effectively answered (and, as a side-effect, removed from Unanswered Questions queue).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.