FTP Client : SUSE2015/12/03 |
For how to connect to FTP server from Clients computer, the example follows is on SUSE.
|
|
[1] | Install FTP Client. |
dlp:~ # zypper -n install ncftp
|
[2] | The connection with root account is prohibited by default, so access with a common user to FTP Server. |
# ncftp [option] [hostname] suse@dlp:~> ncftp -u suse www.srv.world Password: # password of the user Login successful. Logged in to www.srv.world. ncftp /home/suse > # show current directory on FTP server ncftp /home/suse > pwd ftp://suse:PASSWORD@www.srv.world # show current directory on local server ncftp /home/suse > !pwd /home/suse # show files in current directory on FTP server ncftp /home/suse > ls bin/ # show files in current directory on local server ncftp /home/suse > !ls -l total 8 drwxr-xr-x 2 suse users 4096 Nov 27 12:02 bin -rw-r--r-- 1 suse users 5 Dec 4 14:33 testfile.txt # change directory ncftp /home/suse > cd bin ncftp /home/suse/bin > pwd ftp://suse:PASSWORD@www.srv.world/bin/ # upload a file to FTP server # "-a" means ascii mode ( default is binary mode ) ncftp /home/suse > put -a testfile.txt estfile.txt: 5.00 B 587.20 B/s ncftp /home/suse > ls -l drwxr-xr-x 2 1000 100 4096 Nov 27 12:02 bin -rw------- 1 1000 100 5 Dec 4 05:33 testfile.txt # upload some files to FTP server ncftp /home/suse > mput -a test.txt testfile.txt test.txt: 5.00 B 7.49 kB/s testfile.txt: 5.00 B 4.29 kB/s ncftp /home/suse > ls -l drwxr-xr-x 2 1000 100 4096 Nov 27 12:02 bin -rw------- 1 1000 100 5 Dec 4 05:33 testfile.txt -rw------- 1 1000 100 5 Dec 4 05:37 test.txt # download a file from FTP server # "-a" means ascii mode ( default is binary mode ) ncftp /home/suse > get -a test.txt test.txt: 6.00/ 5.00 B 6.60 kB/s # download some files from FTP server ncftp /home/suse > mget -a test.txt test2.txt test.txt: 6.00/ 5.00 B 6.60 kB/s test2.txt: 6.00/ 5.00 B 6.60 kB/s # create a directory in current directory on FTP Server ncftp /home/suse > mkdir testdir mkdir ok, `testdir' created ncftp /home/suse > ls -l drwxr-xr-x 2 1000 100 4096 Nov 27 12:02 bin drwx------ 2 1000 100 4096 Dec 4 14:42 testdir -rw------- 1 1000 100 5 Dec 4 05:33 testfile.txt -rw------- 1 1000 100 5 Dec 4 05:37 test.txt # delete a direcroty in current directory on FTP Server ncftp /home/suse > rmdir testdir rmdir ok, `testdir' removed ncftp /home/suse > ls -l drwxr-xr-x 2 1000 100 4096 Nov 27 12:02 bin -rw------- 1 1000 100 5 Dec 4 05:33 testfile.txt -rw------- 1 1000 100 5 Dec 4 05:37 test.txt # delete a file in current directory on FTP Server ncftp /home/suse > rm test.txt rm ok, `test2.txt' removed ncftp /home/suse > ls -l drwxr-xr-x 2 1000 100 4096 Nov 27 12:02 bin -rw------- 1 1000 100 5 Dec 4 05:33 testfile.txt # execute commands with "![command]" ncftp /home/suse > !cat /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin ... ... suse:x:1001:1001::/home/suse:/bin/bash # exit ncftp /home/suse > quit 221 Goodbye. |
Sponsored Link |
|