Web Hosting Talk







View Full Version : SSH-- Please Help


kmb999
03-15-2002, 06:46 PM
I'm trying to learn how to use the shell so I am a lot less reliant on control panels in the future, but I'm having some problems.

In the transcript below you can see, I tried to mget the files logs.tar.gz and kb2net.tar.gz. I wasn't using the correct format or something because, as you can see, I couldn't get that to work for me. So, I used get logs.tar.gz and get kb2net.tar.gz and both appeared to work fine, but neither was anywhere on my hard drive after the shell said that both worked fine. Any idea on what I am doing wrong, how I can I make both the mget and the get commands do what I want them to do?

Thank you. :D

History of my shell session:

sh-2.04$ history
1 tar -cz --file=backup-03-12-2002.tar.gz kb2.net
2 tar -cz --file=logs-03-12-2002.tar.gz logs
3 logout
4 help
5 -d printer.gif
6 -del printer.gif
7 logout
8 cd
9 du -h
10 ftp -help
11 dir
12 wall -help
13 wall --help
14 #wall hello
15 wall hello
16 ftp -mget logs.tar.gz, kb2.net.tar.gz
17 ftp --mget logs.tar.gz, kb2net.tar.gz
18 ftp
19 ftp web.kylebabich.com
20 sh-2.04$ ftp web.kylebabich.com
21 Connected to web.integrahosting.net.
22 220 ProFTPD 1.2.2rc3 Server (Main FTP Server) [cp.integrahosting.net]
23 Name (web.kylebabich.com:kbabich1): kbabich1
24 331 Password required for kbabich1.
25 Password:
26 230 User kbabich1 logged in.
27 Remote system type is UNIX.
28 Using binary mode to transfer files.
29 ftp> mget logs.tar.gz, kb2net.tar.gz
30 sh-2.04$ ftp web.kylebabich.com
31 Connected to web.integrahosting.net.
32 220 ProFTPD 1.2.2rc3 Server (Main FTP Server) [cp.integrahosting.net]
33 Name (web.kylebabich.com:kbabich1): kbabich1
34 331 Password required for kbabich1.
35 Password:
36 230 User kbabich1 logged in.
37 Remote system type is UNIX.
38 Using binary mode to transfer files.
39 ftp> mget logs.tar.gz, kb2net.tar.gz
40 help
41 history


EDIT: It looks like a couple things are missing from the history. I couldn't get the correct format for the mget command and even though the shell told me that get logs.tar.gz and then get kb2net.tar.gz worked fine, I couldn't find either on my hard drive. Those are my main problems. You'll notice from the history that I was also just fooling around with some stuff. :stickout

allan
03-15-2002, 11:43 PM
To download multiple files using mget, you just need to seperate the files by spaces, you do not need a comma:


[allan@test allan]$ ftp xxx.xxxx.xxxx
Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx).
220 xxx.xxx.xxx.xxx FTP server (Version wu-2.6.1-20) ready.
Name (xxx.xxx.xxx.xxx :allan): xxxxxxx
331 Password required for xxxxxxx.
Password:
230 User xxxxxxx logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> mget index.php contact.php
mget index.php? y
227 Entering Passive Mode (xxx.xxx.xxx.xxx )
150 Opening BINARY mode data connection for index.php (1333 bytes).
226 Transfer complete.
1333 bytes received in 0.00805 secs (1.6e+02 Kbytes/sec)
mget contact.php? y
227 Entering Passive Mode (xxx.xxx.xxx.xxx)
150 Opening BINARY mode data connection for contact.php (9834 bytes).
226 Transfer complete.
9834 bytes received in 0.558 secs (17 Kbytes/sec)
ftp> quit
221-You have transferred 11167 bytes in 2 files.
221-Total traffic for this session was 12053 bytes in 4 transfers.
221 Thank you for using the FTP service on xxx.xxx.xxx.
[allan@test allan]$ ls *.php
contact.php index.php



That should work fine.

kmb999
03-16-2002, 07:17 AM
Thank you, that works. They're still not showing up anywhere on my hard drive though. I must still be doing something wrong.


login as: kbabich1
Sent username "kbabich1"
kbabich1@kb2.net's password:
Last login: Fri Mar 15 16:42:09 2002 from dialup-209.245.118.213.dial1.weehawken1.level3.net
sh-2.04$ ftp web.kylebabich.com
Connected to web.integrahosting.net.
220 ProFTPD 1.2.2rc3 Server (Main FTP Server) [cp.integrahosting.net]
Name (web.kylebabich.com:kbabich1): kbabich1
331 Password required for kbabich1.
Password:
230 User kbabich1 logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd
(remote-directory)
usage: cd remote-directory
ftp> mget logs.tar.gz kb2net.tar.gz
mget logs.tar.gz? y
227 Entering Passive Mode (64,247,10,162,149,195).
150 Opening BINARY mode data connection for logs.tar.gz (916 bytes).
226 Transfer complete.
916 bytes received in 8.3e-05 secs (1.1e+04 Kbytes/sec)
mget kb2net.tar.gz? y
227 Entering Passive Mode (64,247,10,162,149,197).
150 Opening BINARY mode data connection for kb2net.tar.gz (15322582 bytes).
226 Transfer complete.
4096 bytes received in 7e-05 secs (5.7e+04 Kbytes/sec)
ftp> close
221 Goodbye.
ftp> bye
sh-2.04$


EDIT: Just noticed that it actually deleted everything inside kb2net.tar.gz, which was orignally a backup of my site.