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.
!!:gs/1/2/
Here are some more examples: http://mark.stosberg.com/Tech/tips/bash.tips
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With