How to output print to a PC file?

I tried >> to output print results to a file but it didn’t work. What is the trick? And where will the file be (what directory)?
For example,

system package print >> versions.txt

did not work.

Backup Mikrotik config to Subversion/SVN repository via SSH

sshpass -p $sshpassword ssh $sshuser@$sshhost -p $sshport export >$current_export_name

This make an export in to local file on your Linux PC.

You have to use the export command, for example:

/ip firewall filter export file=filter

this will create a file with rsc extension in the files of routerboard.
You can copy paste that file and open with with notepad.

system package print >> versions.txt


system package print file=versions.txt

This make an export in to file on ROS.