-1

I want to know how to place files using touch command inside an directory whether it is multiple or single file.help is appreciated

Chris Davies
  • 116,213
  • 16
  • 160
  • 287

1 Answers1

0

I got the answer

mkdir -p mydir/{colors,shape,animals}

mkdir -p mydir/colors/{basic,blended}
touch mydir/colors/basic/{red,blue,green}
touch mydir/colors/blended/{yellow,orange,pink}
touch mydir/shape/{circle,square,cube}

mkdir -p mydir/animals/{mammals,reptiles} 
touch mydir/animals/mammals/{platypus,bat,dog}
touch mydir/animals/reptiles/{snakes,crocodile,lizard}
annahri
  • 2,075