4

I have a text file named checklog.txt. I want to create directories from that names in the text file line by line.

1 Answer 1

10
cat checklog.txt | xargs -L 1 mkdir

Worked for me.

2
  • 5
    No need to using cat command, "xargs -L 1 mkdir < checklog.txt" can be use instead Apr 26, 2016 at 8:51
  • If you directory names contain spaces, enclose them in quotes
    – ruslaniv
    Sep 25, 2021 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .