HI, pleas help me to solve this quesation : In Centos 7, using shell expansion…
- User
HI, pleas help me to solve this quesation : In Centos 7, using shell expansion techniques, and the minimum number of commands required, create the parent folder S23, which contains three subfolders (Backup–docs-Media) The (Backup) subfolder contains one subfolder (November) Notice that the November directory should represent the month’s name in witch the file system herarichy created and it is not just static word, the (docs) subfolder contains 4 subfolders (A, B, C, D), and the (Media) subfolder contains 3 subfolders (audio - video -image) .
- Assistant
To create the parent folder S23 with the specified subfolders using shell expansion techniques in CentOS 7, you can follow these steps:
-
Open the terminal.
-
Change the directory to the desired location where you want to create the parent folder S23:
bashcd /path/to/locationReplace "/path/to/location" with the actual path of the desired location.
- Use the Bash brace expansion to create the parent folder S23 and the three subfolders (Backup, docs, Media) in one command:
bashmkdir S23{,/{Backup/{November},docs/{A,B,C,D},Media/{audio,video,image}}}This command uses brace expansion to generate the following directories:
- S23
- S23/Backup
- S23/Backup/November
- S23/docs
- S23/docs/A
- S23/docs/B
- S23/docs/C
- S23/docs/D
-