[Info-vax] Wildcards using MULTINET FTP server, Linux client?
Steven Schweda
sms.antinode at gmail.com
Fri Oct 21 15:26:19 EDT 2011
On Oct 21, 10:26 am, sampsa <samp... at gmail.com> wrote:
> I'm trying to do a rm *.*;* in an FTP script and get this error:
> [...]
As usual, a useful problem report would include some basic
information, like which version of what is running where.
Also, as usual, showing actual commands with their actual
output can be more helpful than vague descriptions or
interpretations.
> How do I get rid of those stupid ^'s?
More to the point, how did you get the ".dir;" in the
error message, when you're not dealing with a directory?
Around here:
alp $ tcpip show version
HP TCP/IP Services for OpenVMS Alpha Version V5.6 - ECO 5
on a COMPAQ Professional Workstation XP1000 running OpenVMS V8.3
Adding some diagnostics can be suggestive in this case:
alp $ ftp alp-l
220- Antinode FTP Server. Please be nice.
220 alp.antinode.info FTP Server (Version 5.6) Ready.
Connected to alp-l.antinode.info.
Name (alp-l.antinode.info:sms):
331 Username sms requires a Password
Password:
230 User logged in.
FTP> cd itrc
250-CWD command successful.
250 New default directory is ALP$DKC0:[SMS.ITRC]
FTP> cd ftp
250-CWD command successful.
250 New default directory is ALP$DKC0:[SMS.ITRC.ftp]
FTP> dir
200 PORT command successful.
150 Opening data connection for ALP$DKC0:[SMS.ITRC.ftp]*.*;*
(10.0.0.9,58053)
Directory ALP$DKC0:[SMS.ITRC.ftp]
a.b;1 1/16 21-OCT-2011 14:00:37 [SMS]
(RWED,RWED,RE,)
d^.e.f;1 1/16 21-OCT-2011 14:00:50 [SMS]
(RWED,RWED,RE,)
Total of 2 files, 2/32 blocks
226 LIST Directory transfer complete.
272 bytes received in 00:00:00.00 seconds (38.86 Kbytes/s)
FTP> debug
Debugging on (debug=1).
FTP> rm *.*;*
---> RMD a.b;1
550-Failed to delete directory ALP$DKC0:[SMS.ITRC.ftp]a^.b^;1.dir;
550 file not found
---> XRMD a.b;1
550-Failed to delete directory ALP$DKC0:[SMS.ITRC.ftp]a^.b^;1.dir;
550 file not found
---> RMD d^.e.f;1
550-Failed to delete directory ALP$DKC0:[SMS.ITRC.ftp]d^^^.e^.f^;
1.dir;
550 file not found
---> XRMD d^.e.f;1
550-Failed to delete directory ALP$DKC0:[SMS.ITRC.ftp]d^^^.e^.f^;
1.dir;
550 file not found
One might now ask why this FTP client is using an "RMD"
(and/or "XRMD") command instead of the more obvious choice,
"DELE". The answer is hidden in the documentation:
FTP> help rm
Sorry, no documentation on RM
Additional information available:
APPEND CONNECT CREATE DELETE DIRECTORY DISABLE
DISCONNECT
ENABLE EXIT GET HELP LOGIN PUT
QUOTE
RENAME SET SHOW SPAWN VIEW
Topic? delete
DELETE
Deletes either UNIX or OpenVMS remote files. To use this command,
you must have an FTP session with a remote host.
NOTE
Use caution with the mdelete command. The FTP command
DIRECTORY does not list hidden files (files that start
with a period). Using the mdelete command with any wildcard
deletes hidden files, which you might need.
DCL Format
DELETE remote_files
DELETE/DIRECTORY remote_directory
UNIX Format
delete remote_file
mdelete remote_files
rmdir remote_directory
Additional information available:
Parameters Qualifiers
/DIRECTORY
Examples
DELETE Subtopic?
Thus, "rm" is interpreted as "rmdir", which seems to
confuse everyone.
Using "delete" seems to work better:
FTP> delete *.*;*
---> DELE *.*;*
250-Deleting ALP$DKC0:[SMS.ITRC.ftp]*.*;* ...
250-File ALP$DKC0:[SMS.ITRC.ftp]a.b;1 deleted.
250-File ALP$DKC0:[SMS.ITRC.ftp]d^.e.f;1 deleted.
250 Deleted 2 of 2 files matching
ALP$DKC0:[SMS.ITRC.ftp]*.*;*
Not including "rm" in the list of UNIX-style commands was
probably a mistake, but it's not the biggest mistake in the
TCPIP FTP software (I claim).
More information about the Info-vax
mailing list