3 ms·
Don't forget to put in a '--' to end option parsing too: 'cp --force --' This works around malicious filenames that may start with a '-'. Especially important
by ndsipa_pomu 4y ago
Don't forget to put in a '--' to end option parsing too: 'cp --force --'
This works around malicious filenames that may start with a '-'. Especially important if you're running an 'rm' command
Edit: another workaround is to ensure that files are always absolute pathnames or even starting with './' for relative ones.