To explain my question, here is the dumb way of how I'm doing things:
cp fileFromMyFriend.txt ~/my_first_subfolder/my_second_subfolder/more_subfolders
cd ~/my_first_subfolder/my_second_subfolder/more_subfolders
What is a shortcut to doing those two lines in one? I'm not looking for a concatenation symbol such as & or ;
Rather I'm trying to avoid retyping my very long folder path.
(And I already looked through the cp man page and Googled this question with different wording before coming here)
basename
ordirname
if required). – cas Sep 16 '19 at 05:58