zsh and ftp on MacOS X.

139 views
Skip to first unread message

Eric Bruno

unread,
Mar 24, 2023, 7:37:53 PM3/24/23
to [PiDP-11]
Had some free time today was looking the zsh manual (https://zsh.sourceforge.io/Doc/zsh_us.pdf).  Turns out the zsh has a built in tcp and ftp module. MacOS X switch over to zsh as standard shell a couple of years ago.
(this should work with any zsh installation).
If you happen to using zsh and was not aware if this, comes in pretty heading getting files back and forth.
In your .zprofile file add:

zmodload zsh/net/tcp
zmodload zsh/zftp


On my system dns names do not seem to work but IP's do.
Sample connection:
user ~ % zftp open 10.10.41.204  bruno
=============================================================
Welcome.

This is a running RSX-11M-PLUS system.
=============================================================
Password:
Logged in to system.
user ~ % zftp dir

  Directory DU:[ERIC]

FIZZBUZZ.JOU         1.    27-FEB-2023 04:53:44  [200,210] (RD,RWED,,)
LOGIN.TXT            1.     4-JUN-2022 22:49:01  [200,210] (RWED,RWED,RWED,R)
HELLO.MAC            2.     5-JUN-2022 07:01:47  [200,210] (RWED,RWED,RWED,R)
LOGIN.CMD            1.     5-MAR-2023 13:01:51  [1,1]     (RWED,RWED,RWED,R)
FIZZBUZZ.MAC         4.    27-FEB-2023 07:15:42  [200,210] (RWED,RWED,RWED,R)
INDEX.HTM            1.     9-MAR-2023 23:03:19  [200,210] (RWED,RWED,RWED,R)
START.HTM            1.     9-MAR-2023 23:12:09  [200,210] (RWED,RWED,RWED,R)
STOP.HTM             1.     9-MAR-2023 23:12:33  [200,210] (RWED,RWED,RWED,R)
LOGOUT.CMD           1.    10-MAR-2023 16:47:04  [200,210] (RWED,RWED,RWED,R)
PUBLIC.TXT           1.    10-MAR-2023 11:53:05  [200,210] (RWED,RWED,RWED,R)
GETDIR.CMD           1.    10-MAR-2023 16:37:45  [200,210] (RWED,RWED,RWED,R)
HELLO.TSK            4. C   5-JUN-2022 06:46:42  [200,210] (RWED,RWED,RWED,R)
FIZZBUZZ.OBJ         2.     5-JUN-2022 19:32:45  [200,210] (RWED,RWED,RWED,R)
FIZZBUZZ.TSK         7. C   5-JUN-2022 19:33:01  [200,210] (RWED,RWED,RWED,R)
user ~ % zftp ls
FIZZBUZZ.JOU
LOGIN.TXT
HELLO.MAC
LOGIN.CMD
FIZZBUZZ.MAC
INDEX.HTM
START.HTM
STOP.HTM
LOGOUT.CMD
PUBLIC.TXT
GETDIR.CMD
HELLO.TSK
FIZZBUZZ.OBJ
FIZZBUZZ.TSK
user ~ % zftp get logout.cmd > logout.cmd
user ~ % cat logout.cmd
.enable quiet
set /named
set /def=[eric]
pip *.*;* /pu:4
user ~ % zftp close
Thank you for using this ftp service.
 Data traffic was 61.0 bytes in 1 file.
 Total traffic was 1.32 KB in 3 transfers.


There is also a curses module zcurses

timr...@gmail.com

unread,
Mar 29, 2023, 3:30:30 PM3/29/23
to [PiDP-11]
Interesting.  I never knew that.  I don't really have anything running an FTP server here, but the loads do work on OSX.  Thanks.

jon....@gmail.com

unread,
Apr 8, 2023, 7:27:10 AM4/8/23
to [PiDP-11]
I've been using zsh for over a decade and didn't know there was an ftp module. Does it give any particular advantage over a standalone FTP client, or is it just Zawinski's law in action?

Zawinski's law: "Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones that can." 

Johnny Billquist

unread,
Apr 11, 2023, 5:27:16 PM4/11/23
to pid...@googlegroups.com
(reposting, maybe I just need to trim the quoting...)

A maybe not so well known "feature" in the FTP daemon in RSX: If you do
"cd /" (or the ftp protocol command is actually "CWD /"), RSX will start
showing files in a more unix:y style...

I implemented that back when Firefox could still talk ftp. It was making
assumptions on the output from a DIR command, and it always started by
doing a CWD /, so I just tried to make Firefox happy. Worked great,
until Firefox removed their ftp capability.

Johnny

On 2023-04-08 13:27, jon....@gmail.com wrote:
> I've been using zsh for over a decade and didn't know there was an ftp
> module. Does it give any particular advantage over a standalone FTP
> client, or is it just Zawinski's law in action?

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Johnny Billquist

unread,
Apr 16, 2023, 7:07:38 AM4/16/23
to pid...@googlegroups.com
A maybe not so well known "feature" in the FTP daemon in RSX: If you do
"cd /" (or the ftp protocol command is actually "CWD /"), RSX will start
showing files in a more unix:y style...

I implemented that back when Firefox could still talk ftp. It was making
assumptions on the output from a DIR command, and it always started by
doing a CWD /, so I just tried to make Firefox happy. Worked great,
until Firefox removed their ftp capability.

Johnny

On 2023-04-08 13:27, jon....@gmail.com wrote:
> I've been using zsh for over a decade and didn't know there was an ftp
> module. Does it give any particular advantage over a standalone FTP
> client, or is it just Zawinski's law in action?
>
> Zawinski's law: "Every program attempts to expand until it can read
> mail. Those programs which cannot so expand are replaced by ones that can."
>
> On Wednesday, March 29, 2023 at 2:30:30 PM UTC-5 timr...@gmail.com wrote:
>
> Interesting.  I never knew that.  I don't really have anything
> running an FTP server here, but the loads do work on OSX.  Thanks.
>
> On Friday, March 24, 2023 at 6:37:53 PM UTC-5 ervb...@gmail.com wrote:
>
> Had some free time today was looking the zsh manual
> (https://zsh.sourceforge.io/Doc/zsh_us.pdf
> <https://zsh.sourceforge.io/Doc/zsh_us.pdf>).  Turns out the zsh
> FIZZBUZZ.TSK         7. C   5-JUN-202219:33:01  [200,210]
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/1e0188ff-897c-4a75-9154-14976b459d0bn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/1e0188ff-897c-4a75-9154-14976b459d0bn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages