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?
Asked
Active
Viewed 38 times
3

janosdivenyi
- 3,136
- 2
- 24
- 36
1 Answers
3
This should work...:
cp file ~-

William Pursell
- 204,365
- 48
- 270
- 300
-
1It 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