aspose file tools*
The moose likes Linux / UNIX and the fly likes get zero bytes file from ftp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "get zero bytes file from ftp" Watch "get zero bytes file from ftp" New topic
Author

get zero bytes file from ftp

Rahul Chaudhari
Greenhorn

Joined: Jul 30, 2008
Posts: 5
How to get zero bytes file from ftp.

How I can write ls command output to some file in ftp promte.
I tried using following,

ftp 10.x.x.45 << INPUT_ENDS
cd /home/dynamic/
ls *.csv > /home/dynamic/log/csvfile.txt
quit
INPUT_ENDS

I have full rights to log folder then also I cannot write file and not the output.

Please can any one tell me how to achive it.
Thanks...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

That's because you're working with an FTP server, not a remote shell server. For convenience, FTP's command set is similar to the standard command set, but the FTP shell isn't a command shell and it doesn't have all the command shell features.

The way to create an empty file on an FTP server is to upload an empty file to the FTP server. If your ftp client and local command shell permits it, that could include uploading an empty "here" file, but it's still got to be a file, even if it's only a temporary one.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get zero bytes file from ftp
 
Similar Threads
How to process big file?
[FTP]Copying of remote file to local machine
Trying to read a file on Unix into a file on windows or into a string builder
Read file contents in loop using shell script
Filechannel