9
When I use tramp to open a remote directory (say C-x C-f /ssh:user@example:/somedirectory), it opens up a dired buffer for that remote directory. The problem is that I want to copy directories and or files from the remote server to my local machine. I've tried a few syntaxes like marking all the directory or files, pressing 'C', and specifying local:/somelocaldir or just /somelocaldir, but at best the files get copied onto a file somewhere on the remote server.
Is there a way to copy files from a remote (tramp) dired buffer to a local dir? I've only been using emacs 6 months, so if there's a completely different approach that is better and still lets me use emacs (preferably w/ dired), that would be great.
Just to clarify, I'm not interested in viewing, editing, listing, etc. remote files. I just want to copy files from a remote server to my local machine, with the same effect you'd get if you'd used scp or scp -r. I'm just hoping I can do this w/o having to drop out of emacs or even use the eshell (but I'll probably just do that until I get an answer here).
In most of the installations I've seen,
C-x C-f /user@somehost:/somedir
is sufficient sincescp
is the default exchange method. Try it and see. Maybe you can save a few key bumps. – ephsmith – 2012-07-06T05:07:11.203That just opens a dired buffer. It doesn't actually copy the dir over like "scp -r user@somehost:/somedir ." would do. – labyrinth – 2012-07-06T05:18:38.337
I'm understanding your question more clearly now. The question title had me thinking you wanted to copy files directly from
dired
. I useansi-term
for commands like that if I don't want to leave emacs. Emacs was built for customization. I'm sure you'll get an answer with a lisp snippet at some point. – ephsmith – 2012-07-06T05:27:51.240