by using BYE
BYE = Disconnect the FTP session
bye or quit
A number of people in answering a similar question are saying to use the BYE command
bye or quit BYE - Disconnect the FTP session Found in A+ Guide to managing and maintaing you PC pg. 979
Most Linux systems will have ftp available as a command line option. Try entering "man ftp" in terminal mode to make sure you have it, and to learn the various ftp commands. Typically, you will have to know the ftp site name and the user name and password assigned to you for that ftp site. You will start the ftp session by typing something like: ftp www.mysite.net At the ftp prompt, enter your user name and password, if the server requests that you sign in anonymously place "anonymous" or "ftp" in the username field and leave the password field blank. Then use the ftp commands (e.g 'ls' 'put' 'get' 'cd' 'chmod') to transfer and maintain files at your site. If you prefer a GUI interface, there may be some X Windows ftp clients available for download. Google 'ftp Linux' and see what you can find. I prefer the plain command line version. Much quicker and easier once you learn the commands.
Session
I would try 'exit'.
since it is a server it would be at your phyiscal layer, or if you are taling about the FTP service then that will be at the applaction level.
mdelete is a command to delete files over FTP. Whether or not it's a valid script command would depend on the scripting language.
exit
ftp (file transfer protocol)
Transfer tar files in binary mode.WARNING: some ftp clients go back to ascii mode when you enter an ls or dir command. To be safe, always use the binary command before getting a binary file.