Обновлен поиск findutils в папке с именем «алекс». Что это означает?

Без флага -qваш экземпляр netcatбудет ждать вечно. В UDP нет сообщения «конец потока», поэтому netcatне может узнать, что и stdin , и сетевое соединение завершены.

Например, при использовании TCP/IP все работает как положено:

nc -l localhost 4300                     # Window 1
nc localhost 4300 </etc/group            # Window 2

Но, как вы определили, использование UDP/IP никогда не заканчивается:

nc -u -l localhost 4300                  # Window 1
nc -u localhost 4300 </etc/group         # Window 2

Здесь на помощь приходит флаг -q. Но, к сожалению, он не принимает значение 0. Он также не будет принимать целочисленные значения, отличные от -. Вот лучшая альтернатива, которую я могу предложить без обращения к timeoutили какой-либо другой внешней утилите:

nc -u -l localhost 4300                  # Window 1
nc -q 1 -u localhost 4300 </etc/group    # Window 2

Даже здесь невозможно netcatизящно установить тайм-аут прослушивания. (Параметр тайм-аута -wигнорируется, а -qне имеет значения. )Нечто подобное может быть полезно в практической ситуации, чтобы netcatубивался через 90 секунд:

timeout 90 nc -u -l localhost 4300       # Window 1
nc -q 1 -u localhost 4300 </etc/group    # Window 2
1
02.10.2019, 01:28
1 ответ

Эта запись была добавлена ​​более 23 года назад Кевином Далли , а более подробное объяснение было дано в этом отчете об ошибке 19-летней давности:

I have had some trouble verifying the reason for excluding /alex, though I added it many years ago. /alex refers to the Alex file system. One reference to it is:

http://satcom.nic.in/internet1.htm

I'm not sure how common Alex file system is currently. It would probably be better to have the appropriate value in PRUNEFS rather than PRUNEPATHS. /afs may belong in the same category.

I'm leaving /alex and /afs in for the short term, but after I get a few more fixes in findutils, I will attack this problem.

Эта ссылка мертва, но от Wayback Machine:

The Alex file system provides users and applications transparent read access to files in anonymous FTP sites on the Internet. Today there are thousands of anonymous FTP sites with a total of a few millions of files and roughly a terabyte of data. The standard approach to accessing these files involves logging in to the remote machine. This means that an application can not access remote files like local files. This also means that users do not have any of their aliases or local tools available. Users who want to use an application on a remote file first have to manually make a local copy of the file. There is no mechanism for automatically updating this local copy when the remote file changes. The users must keep track of where they get their files from and check to see if there are updates, and then fetch these. In this approach many different users at the same site may have made copies of the same remote file each using up disk space for the same data.

Alex addresses the problems with the existing approach while remaining within the existing FTP protocol so that the large collection of currently available files can be used. To get reasonable performance long term file caching is used. Thus consistency is an issue. Traditional solutions to the cache consistency problem do not work in the Internet FTP domain:callbacks are not an option as the FTP protocol has no provisions for this and polling over the Internet is slow. Therefore, Alex relaxes file cache consistency semantics, on a per file basis, and uses special caching algorithms that take into account the properties of the files and of the network to allow a simple stateless file system to scale to the size of the Internet.

6
27.01.2020, 23:14

Теги

Похожие вопросы