Create an empty directory structure that exactly duplicates an existing set of directories, but without any of the files from the original directory structure.
Conversation
Notices
-
Embed this notice
Hal Pomeranz (hal_pomeranz@infosec.exchange)'s status on Thursday, 05-Jan-2023 03:41:34 JST Hal Pomeranz -
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Thursday, 05-Jan-2023 03:41:33 JST silverwizard @hal_pomeranz The shitpost version is probably:
cp -r source dest find dest -type f -delete -
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Thursday, 05-Jan-2023 04:01:52 JST silverwizard @chiasm @hal_pomeranz I would probably do a more like find src -type d -exec mkdir -p dest/{}, but a bunch of people already did versions that seem to have solved the minor bugs you'd find in that, so I went with the shitpost -
Embed this notice
chiasm (chiasm@venera.social)'s status on Thursday, 05-Jan-2023 04:01:53 JST chiasm @silverwizard @hal_pomeranz That'd be my solution... -
Embed this notice
Hal Pomeranz (hal_pomeranz@infosec.exchange)'s status on Thursday, 05-Jan-2023 04:04:53 JST Hal Pomeranz @silverwizard @chiasm And it was most excellent ?
silverwizard likes this.
-
Embed this notice