Re: ftp protocol question

From: Barry Margolin (barry.margolin_at_level3.com)
Date: 04/28/03


Date: Mon, 28 Apr 2003 15:27:07 GMT

In article <newscache$cr22eh$iab$1@frodo.fserver.locale>,
Giovanni <gcasanoNOSPAM@freemail.it> wrote:
>In article <3EAD1B1B.B55D4B94@lmco.com>, Joe Durusau wrote:
>>Giovanni wrote:
>>> I have a tiny question concerning ftp protocol and I'd like to get a smart
>>> answer:
>>>
>>> If I connect to an ftp server and I give a command like:
>>>
>>> rm *
>>>
>>> What happens if I disconnect from server (i.e. modem hangs, ecc...) while
>>> command has not yet ended?
>>> Does it continue to delete files even if I am not connected or does it stop
>>> at the disconnect time?
>>>
>>
>> In general, on most systems, if a parent process dies, the
>>children also die. There can be exceptions, and it really doesn't have
>>anything to do with frp as such. If you name your specific OS, I'm
>>sure someone can give you a better answer.
>
>Well, OS specific is Windows NT/2000.

Then why are you asking in a Unix newsgroup?

Anyway, the FTP protocol doesn't provide any way to delete by wildcard.
The way a command like that has to work is that the FTP client performs an
NLST command to get all the filenames that match the wildcard, and then
send a separate DELE command for each filename. So if the connection is
dropped in the middle, it won't be able to delete any more files.

-- 
Barry Margolin, barry.margolin@level3.com
Genuity Managed Services, a Level(3) Company, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


Relevant Pages

  • Re: no globbing by redirection?
    ... I was quite surprized that globbing in arguments and in redirection ... "Words used for filenames in input/output redirection are not ... Note also that wildcard expansion does apply to command names. ...
    (comp.unix.shell)
  • wildcards
    ... EVERY Java utility has wildcard ... ability on the command line. ... Instead you see a list of all the filenames and directory ...
    (comp.lang.java.programmer)
  • Re: [Perl 5.8.8 on WinXP] Command line usage
    ... Perl won't do an in-place edit successfully on a Windows system. ... It is the command shell on Unix systems that expands the wildcard ... This command prints the list of filenames on the console, and the dos command dir accepts wildcards, then the perl program could do anything with those files, like opening them, modifying.... ...
    (perl.beginners)
  • Re: Thinking outside the box on file systems
    ... (it would be pretty inefficient to allow infinite command lines). ... Windows makes the stupid choice that every single program has to invent ... and support wildcard expansion on its own. ... A BUG is a BUG is a BUG. ...
    (Linux-Kernel)
  • RE: Generic way to exploit an insecure /tmp file creation - Red Hat 7,8,9 (Re: Red Hat 9: free tick
    ... Perl has Taint mode to enforce this (well, ... command that invokes a sub-shell, nor in any command that modifies files, ... > data like filenames, ... Hopefully someone notified the Logwatch people... ...
    (Vuln-Dev)