Question on using shell command to upload new G code to SD card

Hi all. I am kinda new to Smoothieboard and right now I am trying to access a smoothieboard via telnet by directly typing in commands in CMD. I am doing alright using most of the commands listed in the console-commands pages (link: except the upload command. Once I connected to Smoothieboard, the prompt says the following:
uploading to file: /sd/erase.gcode, send control-D or control-Z to finish

Can anyone tell me what am I supposed to do in order to upload a snippet of gcode to the existing file in the SD using this upload command? I also attach a screenshot of this prompt. Any help is greatly appreciated. Thanks!

I tried manually type in some text followed by this prompt and hit ctrl-D or ctrl-Z on keyboard. But nothing happens. It seems like the upload command wasn’t finished. I am assuming I am doing the wrong way to use this command.

(I’m just a forum site admin, I don’t know smoothie, but…) Typically on most systems the control-d has to be on a line of its own, so you have to press “enter” before pressing “control-d”

Thanks for that info. I will try it out later this week. Really appreciate that.