For the certain directory how I can get the child directory names in a list?
Use glob. For example, for the current directory, the command to get all sub-directories is
glob -type d *
Or if you want a specific directory, use the -directory parameter:
glob -directory $mydir -type d *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With