您通常会像这样保存 Linux 命令的详细输出:
# command > output.txt
Run Code Online (Sandbox Code Playgroud)
但是,当您使用类似的命令时mysqldump,该>选项会将数据库表的转储输出到所需的文件:
# mysqldump --username=whatever --password=whatever -h localhost database > dump.sql
Run Code Online (Sandbox Code Playgroud)
If you add in the -v (verbose) option to mysqldump, it outputs help information about what the command is doing. How do I save this verbose output to a file since the > option is used to output the database table information to a file?
More specifically, I'm dumping the output of one database into another database like …