这是我的代码
Net::SSH.start("XXX.upload.akamai.com", "sshacs", :keys=>["#{ENV['AKAMAI_SSH_KEY']}"]) do |mk|
channel = mk.open_channel do |ch|
ch.exec("rm filename.mp4") do |tk, success|
if success
puts "++++++++++++ Deleted: #{success.class}"
else
puts "------------ NOT deleted: #{success.class}"
end
end
end
end
success
即使我要删除的文件甚至不存在,也始终为真!
这是怎么回事??