

InterviewSolution
Saved Bookmarks
1. |
Solve : Creating Directories & Subdirectories at once? |
Answer» Hello, I would like to know how to create a tree consisting of directories and subdirectories using ONE command instead of MKDIR and using cd to GO in and create them individually. Hello, I would like to know how to create a tree consisting of directories and subdirectories using one command instead of mkdir and using cd to go in and create them individually. I will make a guess at what your want. Once we know what you want, it is easy. Let';s suppose that yew want any umber of directories from the root with names that have no special chars or spaces. Likewise for sub directories. But sub dirs are created across all the root directories. With the given names. And each sub dir can have a number of empty TXT files with given names. Repeated inn each sub directory. Is that close? Quote from: Reta on December 15, 2010, 08:33:20 PM Hello, I would like to know how to create a tree consisting of directories and subdirectories using one command instead of mkdir and using cd to go in and create them individually. yes you can, assuming you are using BASH Code: [Select]mkdir -p directory/file{a..g} #make directories from filea to fileg |
|