[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV Option Needed!
Re: LYNX-DEV Option Needed!
Sat, 7 Dec 1996 11:09:47 +0000 (GMT)
David Combs wrote:
> Now, when you start up ftp, it remembers "pwd" somewhere,
Not on Unix. Unix maintains a cwd pointer for every process. This
point to the internal copy of the inode for the directory. The inode
describes the directory file, but has no recollection of the name. As
it is a property of the process, changes made in a sub-process are lost
on return (so "!cd" doesn't work), so it is necessary to have an
internal command to perform this function. When you issue lcd, it
actually changes the cwd pointer for the process (and all subsequent
children), so that, if you do "!ls" it will list the new current
> and when you tell it go "get" some file, it then grabs
> it, and stores it in the file-name-path composed of
> the file-name-part (the part after all the slashes) used
> for GETTING the file, PREFIXED by that remembered
> string that as default has the pwd from startup (with
> a slash appended).
If the pathname begins with /, the kernel fetches the directory
referenced by the root inode and looks up the first name after the / to
get the inode for the next level directory. It then fetches the
directory with that inode and repeats until it gets an inode for a file.
If the path doesn't begin with a /, it starts by fetching the directory
referenced by the inode pointed to by the current process' cwd pointer.
(There are added complications for mounted filesystems and symbolic
Files beginning . or .., are handled normally, but . returns the inode
for the same directory and .. points to that of the (primary) parent.
Use ls -i to see the inode numbers relative to the filesystem containing
> How do you CREATE a (new) directory to lcd-to (ie, created
> for purpose of storing retrieved-files into)? You
> hit ^Z (csh), do the mkdir, and "fg" back.
> Or you use "!". Or whatever. The important point
> is that FTP has nothing to do with the creation of
> this directory -- YOU create it with your OWN fingers.
These are very different, because ^Z operates in the context of the
parent of ftp, and the original cwd, whereas ! operates in the context
of a child of ftp, with the cwd as modified by lcd.
> The USEFULNESS of this proposed lynx-feature is that
> you can download sets of files, each set from eg a different
> www-site, into a separate directory, thus avoiding name-clashes
> on eg "README", etc. And you don't have to keep typing
> (er, mistyping) the pathname of where you want it to go,
> forgetting sometimes, misspelling sometimes, etc.
I tend to agree that this is creeping featurism. If you have an ftp
URL, use ftp. If you have an http URL and want to dowload lots of
files, create a batch file to call Lynx for each file. Better still,
encourage the site to prepare an archive file containing all the related
files. Before you consider adding this command, I think you should add
a generic escape command (which gives a prompt at which you can type
multi-character commands), but even then, very few users are going to
> cd'ing up and down its directory tree. Then note the "lcd":
> that is used (I believe) to ONLY reset this prefixable
> string for what dir to write into, on the LOCAL machine.
Because of the way it works, it always operates relative to the result
of the previous lcd, whereas the above implies that it always starts
from the cwd when ftp was started.
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.