LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   How to delete a remote file (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-delete-a-remote-file-519804/)

ignignokt 01-16-2007 09:19 AM

How to delete a remote file
 
I have a script that performs SCP to send files between 2 different servers. I was wondering if there was a way to delete a file on a remote server..any help is appreciated.

Wells 01-16-2007 09:20 AM

Take a look at using rsync over ssh. This should do the trick for you.

jlliagre 01-16-2007 09:21 AM

sftp or ssh could do it.

ignignokt 01-16-2007 09:25 AM

thanks
 
will rsync just delete 1 file or an entire directory?

jlliagre 01-16-2007 09:35 AM

You certainly can use ssh without a password, by sharing keys.

http://www.sun.com/bigadmin/content/...h_setting.html

Wells 01-18-2007 12:13 PM

Quote:

Originally Posted by ignignokt
will rsync just delete 1 file or an entire directory?

It will delete files or directories that are no longer at the original site... or not. This is selectable in the command switches.


All times are GMT -5. The time now is 07:58 AM.