“Virtues, by contrast, we acquire, just as we acquire crafts…

“Virtues, by contrast, we acquire, just as we acquire crafts, by having first performed the actions. … Similarly, then, we become just by doing just actions, temperate by doing temperate actions, brave by doing brave actions.” Nicomachean Ethics, Irwin translation p 21. Bekker 1103a32-b2    

Suppose I wrote a simple program to take in a filename from…

Suppose I wrote a simple program to take in a filename from a user and then execute a command to copy that file to a particular location (e.g. my own submission directory). How could this be exploited for command injection? What security measures should be implemented to prevent it? cp user_input subfolder/