79196350

Date: 2024-11-17 01:34:26
Score: 1.5
Natty:
Report link

The issue is that -n1 and -I can't be used together in xargs. The correct command to create sub-folders in select_images with the same structure as download_resave/ is:

ls download_resave/ | xargs -I {} mkdir -p select_images/{}

Why the second command didn't work is because $0 refers to the script name, not the argument passed to xargs. You need to use {} as the placeholder for the argument, not $0.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Tuhin Shaikh