Oleg Razgulyaev
Oleg Razgulyaev

Reputation: 5935

How to output to file from cassandra client?

I want to save result of list command into file. How can I do it from cassandra-cli?

Upvotes: 8

Views: 2636

Answers (2)

Ramon Rockx
Ramon Rockx

Reputation: 91

For me using a pipe for input did not work. I used the --file argument of cassandra-cli. For example:

cassandra-cli --file commands.txt > listing.txt

Upvotes: 3

Chris Gerken
Chris Gerken

Reputation: 16392

Save the commands you'd type into a file to be used as a script, then invoke cli:

cassandra-cli <commands.txt >listing.txt

Upvotes: 6

Related Questions