Can I save anything from Terminal window 's output to a .txt file?

Can I save anything from Terminal window 's output to a .txt file like Linux command “[command] > aaa.txt” ?

for example:
How to save "system health>print " 's screen output to a .txt file?

Thanks.

/system health print file=file.txt

Can I sepecify a external disk file?
e.g:
disk number 0/aaa.txt ?

/system health print file=disk1/file.txt

File destination is defined same as displayed by

/file print