|How to page: using command line sftp|
|How to: use command line sftp|
The purpose of using sftp is to transfer a file or files from one machine to another. So think of the machine that you are on as
"A" and the one that you are going to login to as "B". The instruction example below is simplified to get you started.
You need to know the full path of where the file is and where the file will be going. So ahead of time "cd" to each of those directories on the two machines and do a "pwd" command to get the full path.
CASE 1: Move a file from "A" over to "B". You are logged into "A".
When the file has been transferred you can type "bye" to exit sftp.
While in sftp type "?" or "help" to see all the possible commands.
[root@eagle]# sftp firstname.lastname@example.org Connecting to antipasto.union.edu... email@example.com's password: sftp> ? Available commands: cd path Change remote directory to 'path' lcd path Change local directory to 'path' chgrp grp path Change group of file 'path' to 'grp' chmod mode path Change permissions of file 'path' to 'mode' chown own path Change owner of file 'path' to 'own' help Display this help text get remote-path [local-path] Download file lls [ls-options [path]] Display local directory listing ln oldpath newpath Symlink remote file lmkdir path Create local directory lpwd Print local working directory ls [path] Display remote directory listing lumask umask Set local umask to 'umask' mkdir path Create remote directory progress Toggle display of progress meter put local-path [remote-path] Upload file pwd Display remote working directory exit Quit sftp quit Quit sftp rename oldpath newpath Rename remote file rmdir path Remove remote directory rm path Delete remote file symlink oldpath newpath Symlink remote file version Show SFTP version !command Execute 'command' in local shell ! Escape to local shell ? Synonym for help sftp> bye