Discussion:
rm -r doesn't delete dotfiles in a directory (.test; #520451)
Noël Köthe
2010-07-31 19:34:42 UTC
Permalink
Hello,

I was pointed to the following problem :

When I want to delete a directory recursivly this doesn't work is there
are dotfiles in the directory:

(this is lftp 4.0.9)

lftp ***@localhost:~> ls -la testdir
drwxr-xr-x 2 test test 4096 Jul 31 18:41 .
drwxr-xr-x 3 test test 4096 Jul 31 18:40 ..
-rw-r--r-- 1 test test 0 Jul 31 18:41 .dotfile
-rw-r--r-- 1 test test 0 Jul 31 18:40 .test
-rw-r--r-- 1 test test 0 Jul 31 18:41 testfile
lftp ***@localhost:~> rm -rf testdir
---> CWD /home/test/testdir
<--- 250 CWD command successful
---> EPSV
<--- 229 Entering Extended Passive Mode (|||53714|)
---- Connecting data socket to (::1) port 53714
---- Data connection established
---> LIST
<--- 150 Opening ASCII mode data connection for file list
---- Got EOF on data connection
---- Closing data socket
<--- 226 Transfer complete
---> DELE testfile
<--- 250 DELE command successful
---> CWD /home/test
<--- 250 CWD command successful
---> RMD testdir
<--- 550 testdir: Das Verzeichnis ist nicht leer
rm failed for 1 of 2 files


older report: http://bugs.debian.org/520451
--
Noël Köthe <noel debian.org>
Debian GNU/Linux, www.debian.org
Alexander V. Lukyanov
2010-08-17 05:43:15 UTC
Permalink
Post by Noël Köthe
When I want to delete a directory recursivly this doesn't work is there
`set ftp:list-options -a' should fix the problem (if the server supports -a
option).
--
Alexander.
Loading...