Hi all,
I have a .dat file on UNIX which is pretty huge, I just need to import it onto my localmachine(which is on NT). I need some guidance in using FTP commands.
Thanking You,
RK
It will depend on what you have avalible "UNIX" is a little broad! , is it Linux, Soaris or some othere flavor? do you have ftpd (server) running on one end or the other (NT or Unix)? Has the Unix server got some compression softwere (tar, gzip)?
Ok lets assume you have access to the command line on teh unix box and it has tar and gzip, you could cd /path/to/file then gzip yourfilename.dat this should compress your file into a ziped file yourfilename.dat.gzIf you have more than one file to move over then you could tar them up and zip them with:
tar -cvzf newname.tar.gz file1.dat file2.dat <or *.dat>
CATUION! though this process can take up a lot of temporary space while the zip file is building and remember with tar your origonal files will be there also!
Now, FTP!
I'll assume that the Unix server is running ftpd (server) and you have access to an ftp login to this server?
make sure you have the ziped file{s} in a directory on the server where you ftp user login has access to, now from your NT machine in a command window do:
ftp yourusername@xxx.xxx.xxx.xxx (xxx = IP Address of your server)
when prompted give the username and again when asked give the password.
You should now be logged in with ftp to that server, now cd to the directory wher your files are and: do ls to see them, make sure you are puting them in the local (NT) directory of your choice with: lcd c:\myftpdir then do:
get newname.tar.gz This should start transfering your file, once complete then do: quit to logout Note: within ftp ? (question) will gine you a list of commands.
Thankyou Laurie,
It helped, I was able to make a connection and transfer the file, but there is a problem.
it says
200 PORT command successful.
150 ASCII data connection for salesfees.dat (192.44.33.567,3921) (499 bytes)
226 ASCII Transfer complete.
ftp: 506 bytes received in 0.00Seconds 506000.00Kbytes/sec.
But when I try to view the contents of the file , there is nothing inside it. Initially the file is 450kb but the file on the local machine is just 1kb.
Kindly Help me out
RK
Did you gzip or compress the file on the Unix system? If you did, once you make your ftp connection from NT to Unix, type binary and return. Then do your get.
Once the file is on the NT system, you will have to use WinZip to uncompress/gunzip and then untar it (if necessary).
Sorry yes probably that .dat file is binary so once logged in to ftp do: bin<cr> (where <cr> is the enter key) then as "bi" says do your get salesfees.dat
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.