hossein
hossein

Reputation: 356

How do I save terminal output into a log file?

I'm running ycsb, which sends workload generated by YCSB to mongodb and it has a standard output, which I am storing in the file outputLoad.

./bin/ycsb load mongodb -s -P workloads/workloada -p mongodb.database=ycsb > outputLoad

The -s parameter in the command tells it to generate a client report status. The report status is printed directly to my terminal. How can I get this status into a log file?

Upvotes: 0

Views: 607

Answers (1)

user513951
user513951

Reputation: 13770

Redirect standard error (file descriptor 2) to a file.

./bin/ycsb [...options...] > outputLoad 2> mylog.log

Upvotes: 2

Related Questions