1836360 Members
2239 Online
110100 Solutions
New Discussion

ftp question

 
SOLVED
Go to solution
Ridzuan Zakaria
Frequent Advisor

ftp question

Hi All,

Is there any ftp option that is equivalance to "cp -p"?

I would like to keep the file properties unchange.

Thanks.
quest for perfections
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: ftp question

No. Remember that FTP is a cross-platform protocol so many of the concepts have no meaning in other OS's. However, most FTP implementations support the chmod operation so with a combination of FTP's ls, put, get, and chmod -- if ftpd allows all of these commands -- (or local versions of the commands if going the other way) you can generally achieve what you are trying to do. It also depends upon the umask setting that ftpd is running.
If it ain't broke, I can fix that.
Ridzuan Zakaria
Frequent Advisor

Re: ftp question

Thanks.
quest for perfections
James R. Ferguson
Acclaimed Contributor

Re: ftp question

Hi:

There is no direct equivalent method.

Regards!

...JRF...
Steven Schweda
Honored Contributor

Re: ftp question

As others have said, the true answer is no,
but programs like wget have the ability to
scan an FTP directory listing to get the
date-time for a remote file, and set it/them
after the file has been fetched. Wget also
has an option for file permissions (which it
gets the same way), which can be helpful:

--preserve-permissions preserve remote file permissions.

http://www.gnu.org/software/wget/wget.html

Without knowing your exact requirements, it's
hard to say that wget will satisfy them, but
it may be worth a look.