still kind of a stealthy love ninja (
zvi) wrote in
dw_dev_training2009-09-30 08:13 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
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.
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.
no subject
$ 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.
no subject
no subject
no subject
no subject
I don't use sshfs as suggested by some commenters, mostly because I'd probably forget to unmount it or something and then if I mounted it in the wrong place updatedb would start indexing it next morning. ;p What I actually tend to do is either scp or a combination of ssh+tar, such as:
ssh dh-sophie@hack.dreamwidth.net "cd somedir; tar zc *" | tar zxv
I do this when I need to transfer multiple files. since I've found scp to be abysmally slow at that, if there are a lot of files, even with compression on.
Hope that helps. :)
no subject
no subject
no subject
as mentioned below, sshfs is teh awesome. if you're running a gnome desktop, you can also go to places -- connect to server and add it there.
no subject
Will check out the connect to server option.
no subject
no subject
I just, really, wow, so sexy.
no subject
no subject
no subject
no subject
no subject
Maybe standards of that vary around the world, but I don't usually have any problems with speed, so I was very confused by how slow sshfs was working for me - changing directories was quite painful.
no subject
Not as shiny as SCP or the like, but its quick and dirty.
no subject
It may also help to
:set paste
before pasting (and optionally:set nopaste
afterwards), otherwise you might get vim's auto-indenting screwing with your already-indented code.