Usage Example 4

RFC822 Filesystem and Midnight Commander

Like the previous Example 3, this page shows how an unmodified Midnight Commander can browse a remote file system through HTTP. This time, an HTTPFS server is HFS822, which implements a "file" system over a structured document: an RFC822 message.

As before, we start the Midnight Commander and enter at its prompt the following directory change command:

     cd mc:adapterh/remhost/cgi-bin/
           admin/HFS822-server.pl/
           DeepestRoot/tmp/message1/
with the slash at the end of the "directory" name. Here adapterh is a host running mcserv, and remhost is a site that contains an RFC822 /tmp/message1 in question. It is the same message as the one we used in Example 2.

LeftFileCommandOptionsRight
...er.pl/DeepestRoot/tmp/message1
Name Size MTime
/..
 Body
 Content-Length
 Date
 From
 Received
 Subject
 To
 
3584
1168
4
37
33
378
36
14
May 18 1999
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
 Subject
~
Name Size MTime
/..
/.ncftp
/http-vfs
*.bash_profile
 extfs.ini
 lilo1.conf
 
 
 
1024
1024
1024
1555
194
487
May 4 20:12
Dec 18 09:58
May 7 16:56
Mar 30 14:00
Jan 22 16:05
Mar 11 16:20
/..

Hint: VFS coolness: tap enter on a tar file to examine its contents.
~> 
1Help2Menu 3View4Edit5Copy6RenMov7Mkdir8Delete9PullDn10Quit

The left pane of the Midnight Commander's window shows message1 as a directory full of files. We can view message headers as if they were ordinary files (select a file and press F3):
File: Subject Col 036 bytes  [grow]100%
final confirmation for FREENIX track


1Help2UnWrap 3Quit4Hex5Line6RxSrch7Search8Raw9Format10Quit

 

After we exited the viewer and returned to the MC's dual panes, the file Subject was still selected as current. We then pressed F5 to copy the file from one pane to the other: from a pseudo-file system onto the real file system. The latter may be a remote HTTPFS system, even across a firewall. The RFC822 header Subject is a file, as far as the Midnight Commander is concerned. Here is a copy operation confirmation box:
Copy
Copy file "Subject" with source mask:
*
[x] using shell Patterns
to:
/usr/local/home/oleg
[ ] follow sYmlinks  [x] Dive into subdir if exists
[ ] Stable Symlinks
[ Ok ]  [ Background ]  [ Cancel ]
 

 

Here is the result of copying the Subject file. The file showed up in the left pane. It becomes an ordinary file now.
LeftFileCommandOptionsRight
...er.pl/DeepestRoot/tmp/message1
Name Size MTime
/..
 Body
 Content-Length
 Date
 From
 Received
 Subject
 To
 
3584
1168
4
37
33
378
36
14
May 18 1999
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
Mar 30 03:01
 Subject
~
Name Size MTime
/..
/.ncftp
/http-vfs
*.bash_profile
 extfs.ini
 lilo1.conf
 Subject
 
 
1024
1024
1024
1555
194
487
36
May 4 20:12
Dec 18 09:58
May 7 16:56
Mar 30 14:00
Jan 22 16:05
Mar 11 16:20
May 18 1999
/..

Hint: You can do anonymous FTP with mc by typing 'cd ftp://machine.edu'
~> 
1Help2Menu 3View4Edit5Copy6RenMov7Mkdir8Delete9PullDn10Quit

 
Prev example Back to the Paper

 


Last updated June 25, 1999