To append text input in the terminal to a file on SDF, you can open the file on SDF in your favourite text editor. Or simply use the command cat file, send the data to the terminal (via the paste function), and finish with a single line containing only ^D (CTRL-D) - to do that in the terminal, hit RETURN, CTRL-D, RETURN; this will close the. Connect:Direct or NDM (Network data mover) is file transfer program, which copy file from source server to target. We can use this in both Mainframe and Mid-range to transfer file. It uses TCP/IP to transfer file and more made file transfer routine and reliable. Following a step in NDM to tranfer file.
- Ndm File Transfer Tutorial Unix Tutorial
- Ndm File Transfer Tutorial Unix File
- Ndm File Transfer Tutorial Unix Programming
[ SDF Public Access UNIX System .. Est. 1987 ]
joinwelcomefaqstatusmembersprojectsstoretourgopherabusedialupminecraftsocialtildenihongoeuropawebmailgalleryusermapirctutorialssoftwaretelnetgitssh
This tutorial discusses various ways to get data from and to a local(external) machine into and out of SDF.
Contents
- FTP - File Transfer Protocol
- scp and sftp - secure copying and ftp
- ssh and tar - securely copying directories
- Gopher and HTTP - using the internet for download
- Terminal - direct copying via the terminal
- E-mail - for small files only
- Glossary - explications of terms
To Do
- x/y/zmodem transfers
- kermit transfers
Introduction
To transport data between SDF and your local (or any other external)machine, there are various ways. Their availability depends on your memberlevel on SDF (see theFAQ, MEMBER sectionfor more information), the external system, and their connection.
FTP - File Transfer Protocol
FTP(File Transfer Protocol) on SDF is available only fordownloading public files. This is for security reasons. Forupload and download of private files, scp and sftpmust be used.
Note: ARPA membership allows for up-&download via FTP; however,it is better to use scp or sftp if possible, as FTP is unencrypted, and your passwords also have to travel in the clear.
For download, point your FTP program to sdf.org and doanonymous FTP to read data (username anonymous, passwordyourlogin@sdf.org, or another of your e-mailaddresses).
scp and sftp - secure copying and ftp
scp and sftp are secure ways to transfer data between computers,based on ssh (secure shell). If you've only worked with ftp before, you'll be surprised at the ease and benefits to using scp.
Let's say you're logged into sdf and you want to transfer some pictures from your home machine (named foo in this example) to your sdf home directory. You would want to use the following command:
scp *.jpg me@sdf.org :/your/remote/home/
Let's break that down
- scp
- The command itself.
- *.jpg
- The files you want to transfer.
- me@sdf.org
- Your username @ the server you wish to connect to.
- :/your/remote/home/
- The directory you'd like to upload it.
Unless you've installed ssh authorization keys, you'll be prompted for your username and password. Afterwhich, you should have output similar to this:
Ndm File Transfer Tutorial Unix Tutorial
On SDF, you need to have ARPA membership to be able to use them. Check the manpages of scp and ssh for more information and options to use.
On Windows machines, you can use the PuTTY programs.
ssh and tar - securely copying directories
Ndm File Transfer Tutorial Unix File
The tar archiving tool can be used with ssh to quickly duplicate wholedirectory trees:
tar cf - target_dir | ssh me@freeshell.org ' tar xf - -C ~/path/ '
Note: this trick requires compatible versions of tar on the local and remote systems
Gopher and HTTP - using the internet for download
To get data out of SDF on a local machine, you can of course publish themon your gopher- or web-site. Please check theFAQ, GOPHER sectionand thewebsite tutorialfor information how to set up these sites.
Please note that HTTP traffic is bandwidth limited depending on yourmembership level; if you go over the quota, your site will be temporarilyblocked!
To prevent access by everybody, see the FAQ entry aboutpassword protectionof websites.
Terminal - direct copying via the terminal
For transferring small amount of text data (scripts, tables,source code snippets), think about copy/paste directly in theterminal! If you areMetaARPA,then you can use screen and its built-in copy facility totransfer data between different screens.
To append text input in the terminal to a file on SDF, you can open thefile on SDF in your favouritetext editor.Or simply use the command cat >>file, sendthe data to the terminal (via the paste function), and finish witha single line containing only ^D (CTRL-D) - to do that in theterminal, hit RETURN, CTRL-D, RETURN; this will close the standardinput the cat was reading from.
E-mail - for small files only
If you have to transfer binary data and cannot use scp (because you're notARPA,which is a pity), then you may need to use file transfer via e-mail. Forthis, you attach the data you want to get into SDF to a message which yousend to your address on SDF (yourlogin@sdf.org). On SDF, youread the message and save the attachment where you need the data (e.g, inyour home directory, from where you can move them using mv).
This may not work for large attachments, as the e-mail system(everywhere!) was not intended for file transfer. If you have toregularly transfer large files, you should seriously considerbecoming ARPA!
Glossary
- ARPA and MetaARPA
- These are additionalmembershiplevels on SDF which allow for more commands and provide more space and thegood feeling of supporting SDF!
- download
- to get data from SDF to your local machine; imagineSDF sitting somewhere uphill so that everybody can see it - thenyou get the data down from SDF
- This is a software suite for Windows machines for ssh and scp connections.
- SDF
- Super Dimensional Fortress - if you don't know what that is,then why are you reading this..? wink
- terminal
- The equipment used to connect to a computer in text mode(for a more accurate definition see the correspondingWikipedia entry),or in a narrower context the window which gives access to a SDF in text mode.If you are using Windows, it may be a telnet window (or better usePuTTY for secure access via ssh - that's even possible withoutbeing ARPA), or on a Linux machine an xterm window.
- upload
- to get data to SDF from your local machine; seedownload
(this page was generated using ksh, sed and awk)
FTP is File Transfer Protocol. SFTP is secure FTP. In this article let us review how to connect and login to a remote ftp server for downloading and uploading files using ftp or sftp command. Most of the ftp commands are applicable to sftp. So, wherever ftp is mentioned, you can use sftp also.
1. Connect to a FTP site
Connect to a particular FTP server using ftp command as shown below.
Syntax:
You can directly open connection with a remote host using it’s IP or host name from the command line. You can also go to ftp prompt and use open command to connect with remote host.
It will ask you for the user name and password to login. On some public domain FTP server, you can use “anonymous” username with any email address as the password to connect.
2. Download a file using ftp
Use the get command to download file from a remote ftp server as shown below.
You have to be in the right mode to download files. i.e binary or ascii mode. Use ascii mode for transferring text files, and binary mode for all other type of files.
Download the file and save it with another name. In the following example, index.html file will be downloaded and saved as my.html on the local server.
3. Changing FTP Mode to binary or ascii
Go to ftp Ascii mode
Go to ftp Binary mode
4. Uploading a file to FTP server
Use put command to upload a file to a remote ftp server as shown below.
5. Changing the remote and local directory
Apart from downloading or uploading a file, you may want to change either the remote or local directory, which you can do using cd and lcd respectively.
Change the remote server current directory using cd command
Ndm File Transfer Tutorial Unix Programming
Change the local machine current directory using lcd command
Note:
- executing ! takes you to the shell.
- prompt starts with ftp> is ftp prompt.
- prompt starts with $ is shell command line.
6. Listing the contents of remote directory from FTP
You can view the content of a remote directory using the ls / dir command.
7. FTP Help
Type help or ? to view list of all available ftp commands.
For a detailed help on a particular ftp command use:
8. Downloading multiple files with mget command
mget is for fetching multiple files from ftp server. You can use globs to download multiple files. For example, *.html will download all html files. The glob expansion are done on the remote server. So, it depends on the operating system of the remote server.
To view the file names before downloading, you can also use mls command as shown below.
9. Uploading multiple files with mput command
Use mput to upload multiple files together. This works similar to the mget command. The following example uploads all the *.html file from local server to remote server.
10. Close a FTP connection
Without exiting the ftp prompt you may want to open a connection to another server. In that case, execute close command.