Is there a built-in way to copy a file from current directory to previous directory?
1
vote
1
answer
51
views
My pwd is
/long_path/lots/of/subs/waydeep/
. If I cd -
, it will return me to /lastdirectory/long_pathway/very_deep/
.
Is there a shortcut terminal/cli command to copy file1.ex
from the current working directory to the last working directory? (It might look like cp file1.ex -/
.) If I moved files between these two frequently, I could create a soft link, but I want to find or make a more general solution.
If there is no built-in facility to do this, how could I add it -- let's say to my shell (bash)? I ask because the issue comes up often enough that it would be a useful thing to have ready.
Currently using linux Mint 23.1 and Fedora 40, but the question is general for most/any distribution, esp. using terminal (and possibly bash).
Asked by Old Uncle Ho
(139 rep)
Dec 13, 2024, 05:00 PM
Last activity: Dec 13, 2024, 05:04 PM
Last activity: Dec 13, 2024, 05:04 PM