Wednesday, January 23, 2008
Leopard Spots: Paste from Finder to Terminal
Actually, I don't know if this is a new Leopard thing or not, but it's massively useful. The other day, I needed to move some JAR files from one place to another, and I already had my trusty terminal window open on the destination directory. I wasn't sure which ones I needed in the giant pile in the source directory, so a wildcard expedition in Quicksilver didn't seem like the right way to go. So, I went to Finder and visually sighted the 4 files I needed. Wouldn't it be nice if I could just copy and paste them into the terminal? Why not try? So I did. Now, it didn't copy the files, but it did give me fully qualified path names to each of the files, separated with a space. A quick "cp" added to the front and an " ." added to the end, and they're copied. I don't know if Finder has always allowed you to copy and paste fully qualified file names, but it sure does now.