Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Drag to save Mail attachments in Terminal UNIX
When you get an attachment in Mail, the usual way to move it to a folder is via the Save button in the message or a control-click and then choose Save (or you can drag it into a Finder window). Either of these methods brings up a Finder window from which you can mouse around to put it where you want.

But if you are already working in a Terminal window in the directory where you want to save the attachment, type 'cp ' (note the space), then drag the attachment to the Terminal window and drop it there. Finally, type a period. When you're done, your Terminal window will look something like this:
cp /private/var/tmp/folders.501/TemporaryItems
/ .
Press Return and, voila!, your attachment is copied.

[robg adds: I broke the Terminal line for a narrower display; there won't be a line break when you actually do it.]
  • Currently 2.33 / 5
  You rated: 5 / 5 (3 votes cast)

Drag to save Mail attachments in Terminal | 3 comments | Create New Account
Click here to return to the 'Drag to save Mail attachments in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Drag to save Mail attachments in Terminal
Authored by: robleach on Dec 21, '06 09:54:22AM

I suppose if your desktop was cluttered with windows and you couldn't drag over a folder where you wanted to save them and you happened to have a terminal window accessible, it might be convenient to do this, but it usually seems more convenient to me to just drag the files to either the desktop or some other folder. You can either drag them from their icon embedded in the email, or click the little triangle at the top to reveal them all together and then drag them from there.

[ Reply to This | # ]
Drag to save Mail attachments in Terminal
Authored by: Anonymous on Dec 22, '06 08:28:48AM

No, that would be solved by Exposť. Bang on F11.

As for dragging icons onto Terminal, it's hardly a new thing. Yeah, so people don't expect Mail to behave like other apps, because every other mail app is brain dead about attachments, but this is standard behaviour on the Mac; not just Mail.

[ Reply to This | # ]
Drag to save Mail attachments in Terminal
Authored by: kenahoo on Dec 23, '06 05:31:43AM

I think the interesting thing about this hint is the actual path you get. Note that it's not in ~Library/Mail Downloads/ or ~/Library/Mail/, it's in /private/var/tmp/ . And the "" folder name seems to indicate that the only purpose for these files is to be a source for dragging.


[ Reply to This | # ]