Say I'll start writingsudo cp /etc/var/more/evenMORE/fileABCand as the target of the copying, I'd like to define the same folder, except just a different filename (whether it is a new name like randomNAME or an iteration of the file fileABC-backup01 shall be irrelevant). How can I reuse the input file so that I do not have to write it out again? Is this even possible?Sorry about the title. If you can think of a better one, please don't hesitate to edit it.
How can I address the path/file I just specified again?
bash;command line;arguments
sudo cp /etc/var/more/evenMORE/file{ABC,DEF} will copy fileABC as fileDEF in the same folder.In general cp /xyz/{file1,file2} will copy /xyz/file1 as /xyz/file2. Basically, put anything that is common outside the {} and separate the source and destination names with a , in the {}.