- Requirement
Several files in remote machines ought to be deleted via sh. Name of the files to be deleted are know
- Approach
1) 开发者_运维技巧script was written with ftp (requires credential) and delete command. File names were passed as array(iterated via for loop-with ftp+delete commands enclosed within for loop). files were not getting deleted by this approach
2) another approach attempted was to pass temp.ftp(which contains delete command) to ftp command and rm the temp.ftp file eg.ftp <
- Request
require pointers to delete muliple files in remote machine via shell script
I recommend using ssh instead of ftp for interfacing with the remote unix machine. SSH allows you to run remote commands easily and securely.
Read this article for more info.
精彩评论