Wget.listing file, there is a way to specify its name

Okay, so I need to run wget, but I am not allowed to create point files in the place where I need to run wget. So my question is: "Can I get wget to use a name other than .listing, which I can specify."

further clarification: this is the synchronization / mirroring of the ftp folder from the local one, so using the -O option is not very useful, since I need all the files to support the format.

+3
source share
4 answers

You can use the option -Oto set the name of the output file, for example:

wget -O file http://stackoverflow.com

wget --help, .


, , , :

@FelixD, , , . wget 1.19 ( 2017), ftp.c, , .listing LIST_FILENAME . , ftp- - , lftp mirror, : lftp.yar.ru

+1

@Paul: -O, spong

0

. .

Wget/SRC/ftp.c

/* File where the "ls -al" listing will be saved.  */
#ifdef MSDOS
#define LIST_FILENAME "_listing"
#else
#define LIST_FILENAME ".listing"
#endif
0

I have the same problem; wget seems to save the file .listingin the current directory where wget was called from, regardless-O path/outpout_file

As an ugly / desperate solution, we can try to run wget from arbitrary directories:

cd /temp/random_1; wget ftp://example.com/ -O /full/save_path/to_file_1.txt

cd /temp/random_2; wget ftp://example.com/ -O /full/save_path/to_file_2.txt

Note. The guide states that use of the option --no-remove-listingwill result in the creation of .listing.1,. listing.2etc., so this may be a conflict prevention option.

Note: the .listing file is not created at all if the FTP login is not executed.

0
source

Source: https://habr.com/ru/post/1740062/


All Articles