How can I save/download the results from CLI in the localsystem?

The following command gives a result as per query in the command line :

influx -host your_host -port 8086 -database 'your_db' -execute 'select * from your_metric' -format 'csv'

But I want to save these results on my system as raw .csv files. Is there a way ?

influx -host your_host -port 8086 -database 'your_db' -execute 'select * from your_metric' -format 'csv' > my_file.csv Should do what you want. the > my_file.csv redirects the output to the file ‘my_file.csv’

HTH,
dg

Hello,
when typing the following
influx -database 'your_db' -execute 'select ... GROUP BY "tag1","tag2" ' -format 'csv' > my_file.csv

I expect
measurement,tag1,tag2,timestamp,value1,value2, ...
Instead, I get
measurement,"tag1,tag2",timestamp,value1,value2, ...

The extra quotes around the tags lead to problem when opening the csv with other software.
Is it an intended behavior or a bug?

Thanks,
Marco