Cron creating files on the server

0

I have the commands:

curl https://meusite.com/acesso/cron/cotacoes
wget https://meusite.com/acesso/cron/CPTEC

It runs these two commands that are responsible for saving some photos on the server, the problem is that in addition to saving the photos (they save the photos in the correct folder) they are creating files in the '/' with the end of URL.NUMBER , such as:

cotacoes.01
CPTEC.01

The problem is that I do not know what they are creating because I did not put any command to create it. If this is the case, it might be easier to save, but in the / stations / folder

How can I fix this? He needed it to stop generating those files, or at least indicate a folder to save it to stay organized.

    
asked by anonymous 17.10.2017 / 17:31

1 answer

1

To determine a directory where files will be saved, with wget , just enter the parameter -O , eg:

# Salva na raiz
wget https://meusite.com/acesso/cron/CPTEC -O /
# Salva em um subdiretório
wget https://meusite.com/acesso/cron/CPTEC -O /estacoes/

curl just enter the parameter -o , note that the parameter here is minuscule, eg:

# Salva na raiz
curl -o / https://meusite.com/acesso/cron/cotacoes
# Salva em um subdiretório
curl -o /cotacoes/ https://meusite.com/acesso/cron/cotacoes

Note that in first you first tell the location where it will be saved and then URL , then Wget comes to URL after the place where it will be saved.

    
17.10.2017 / 18:16