Hi,
Is there a simple way to paste / copy a file multiple times in the same directory in Linux?
For example, if I need to create 15 instances of the same file in Windows, each time you paste / copy it the WinOS would append an incrementing number to the file. Is there a similar approach in Linux?
I don’t want to write scripts - need to do this dozens of times for one project. Command line or GUI are both fine.
TIA
Here’s a linux command line oneliner for you:
for i in {1..15}; do cp --backup=numbered sourcefile backupfolder; done
2 Likes
Seems this behaviour, the inability to past multiple times and get multiple copies of the same file with incrementing numbering, is true of all volumes BUT the root / boot volume.
Fedora 38 for me.
Ok, seems we figured it out.
First copy the file to the target directory, then copy it again in the target directory and past multiple times with CTRL | V
Quirky.