Find the answer to your Linux question:
Results 1 to 3 of 3
I have no problems connecting to my remote ftp server via terminal/console using 'ftp' command line. I cannot, however, delete a directory using either 'rm' or 'rmdir' because "directory is ...
  1. #1
    Linux Newbie felipe1982's Avatar
    Join Date
    Oct 2006
    Posts
    164

    difficulty deleting remote directory using FTP command line

    I have no problems connecting to my remote ftp server via terminal/console using 'ftp' command line. I cannot, however, delete a directory using either 'rm' or 'rmdir' because "directory is not empty". 'rm -R' and 'rmdir -R' both do not work. How do I delete a non-empty directory via 'ftp' command? I don't want a 'workaround' solution. I need to do this via COMMAND LINE ONLY.

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    well, how about this:

    cd <dir>
    rm *
    cd ..
    rmdir <dir>

    using sftp, this works on my test directory. You must have write
    permissions both for the directory, and for any files it contains
    the sun is new every day (heraclitus)

  3. #3
    Linux Newbie felipe1982's Avatar
    Join Date
    Oct 2006
    Posts
    164
    good call! I'll try that!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...