Writing a file to Linux

Hi there Knimers … I have a requirement to download a .txt file from a Linux directory using an ssh remote connection, removing any rows to make it a 0 byte file and then uploading it again with a .txt.done format. The problem is, the upload node writes the .done extension as a directory. In fact, using the upload node, uploading/writing a .txt file also creates a directory. Anyone any ideas on how to resolve this?

This seems like an odd way to solve the problem (e.g why are you wasting network resources to download a file you’re going to delete?) Have you considered issuing the command over SSH to rm the file (and if it has to exist with 0 bytes, then touch it after you’ve deleted it) ?


Yes this is odd but that is the requirement as the 0k will be used to kick off another process. I agree on your Network resources point …and thats why I am looking for alternative suggestions. the file has data , this data needs to be cleaned of data, moved , renamed (with a .done ext) . There seems to be no obvious way to do this over a remote connection

You mean no obvious way to do this with a node - because you can do it with a command line ssh call like:

ssh you@some.host "cd /tmp/werewulf; rm wwulf.txt; touch wwulf.txt.done"

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.