zvi: self-portrait: short, fat, black dyke in bunny slippers (Default)
still kind of a stealthy love ninja ([personal profile] zvi) wrote in [site community profile] dw_dev_training2009-09-30 08:13 pm
Entry tags:

Extremely naive question about working with SSH

Okay, when I have a patchfile on my dreamhack, how do I get it out of my dreamhack?

That is to say, when people have asked me to pastebin a file to them, I've been running less on the file, copying each screen, and adding them all together until they make the whole file and then posting it to pastebin.

I know this doesn't transfer files with 100% accuracy to pastebin, but it's usually good enough. However, there has to be a better way to get a file off the dreamhack and onto my local computer, so I can upload it to bugzilla. I just can't, for the life of me, figure out what that better way might be.
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2009-10-01 12:31 am (UTC)(link)
There's a bunch of ways of doing it. What I tend to do, because I'm a lazy guy and it's so easy, is just copy it to htdocs for a moment. Assuming the file is named foo.patch, you can just do,

$ cp foo.patch htdocs/foo.txt

Then go to the file in your browser:

http://your hack address.com/foo.txt

When you're done, you can remove it with rm. Note that naming the file ".txt" allows you to pull it up easily in your browser. If it doesn't haven't an extension, or has .patch or .diff or something else, your browser won't display it and will ask if you want to download the file.