#TIL you can create multiple folders under a directory with a single command.
-
#TIL you can create multiple folders under a directory with a single command.
`mkdir -p cool-fedi-project/{postgres-data,redis-data}`
Which creates cool-fedi-project and then both postgres-data and redis-data underneath!
-
#TIL you can create multiple folders under a directory with a single command.
`mkdir -p cool-fedi-project/{postgres-data,redis-data}`
Which creates cool-fedi-project and then both postgres-data and redis-data underneath!
@box464 You can even have that in the middle of the path, so you could have written it as
mkdir -p cool-fedi-project/{postgres,redis}-data -
#TIL you can create multiple folders under a directory with a single command.
`mkdir -p cool-fedi-project/{postgres-data,redis-data}`
Which creates cool-fedi-project and then both postgres-data and redis-data underneath!
@box464 Okay, that is *neat* and very handy. <bookmarks>
-
@box464 Okay, that is *neat* and very handy. <bookmarks>
-
#TIL you can create multiple folders under a directory with a single command.
`mkdir -p cool-fedi-project/{postgres-data,redis-data}`
Which creates cool-fedi-project and then both postgres-data and redis-data underneath!
That’s a standard shell feature. A more efficient way of writing same is
mkdir -p cool-fedi-project/{postgres,redis}-dataor even
mkdir -p cool-fedi-project/{postgre,redi}s-dataIt also supports ranges, e.g.,
mkdir -p cool-fedi-project/data-{0..5}creates 6 folders. They can be combined
mkdir -p cool-fedi-project/{a..z}-data-{0..9}{0..9}creates 2600 folders (26 from letters, 100 2-digit numbers)
mkdir -p cool-fedi-project/{a..z}-data-{0..99}Also creates 2600 folders, but with a mix of single and double digit numbers.
-
R relay@relay.infosec.exchange shared this topic