user276712
user276712

Reputation: 892

unix utility that reads files into memory?

I am using Ruby's net-ssh library to remotely execute shell commands. I would like to read a few files into memory rather than simply transfer them via SCP/SFTP. Can can I do this?

Upvotes: 0

Views: 93

Answers (1)

Habbie
Habbie

Reputation: 2230

If you use wc or ls to find the size, you can use cat to get the data out, then read the right number of bytes.

Upvotes: 1

Related Questions