Is there a way to change the previous command in linux? I'm copying a bunch of files using
cp path/to/source1 path/to/target2
and I want to change it to
cp path/to/source2 path/to/target2
so I want to replace the 1 with the 2
I know I can put this inside a loop but I need to do this after checking something in my notebook.