3

I know that cd - goes back to the latest directory. Is there a similar shortcut for copying a file from the current directory to the latest directory?

janosdivenyi
  • 3,136
  • 2
  • 24
  • 36

1 Answers1

3

This should work...:

cp file ~-
William Pursell
  • 204,365
  • 48
  • 270
  • 300
  • 1
    It works indeed, thanks. [This](http://www.thegeekstuff.com/2010/06/bash-tilde-expansion/#more-4794) explains why it works. – janosdivenyi Feb 25 '15 at 17:53