I am a unix noob, so please be patient :-)

I have a script that scps a bunch of files to another server.

Suppose they are z1.foo, z2.foo etc. What I want to do is to overwrite the files at the destination. However there might be additional z100.foo files at the destination from a previous job that I need to delete.

How do I securely delete files from the destination?

Thanks.

link|improve this question
feedback

1 Answer

To remove files non-interactively:

ssh hostname "rm -f z100.foo z200.foo"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.