I've looked this up and tried everything using rsync and involving find ., but keep getting errors. Using rsync I get "rsync error: errors selecting input/output files, dirs (code 3)", and using find . all my subfolders I want to copy say "read-only file system." I've seen that this is a common issue with Catalina, however. Is there an alternate solution that will allow me to copy just the folder structure (without the files) into a new directory? Thanks!
12 Answers
Say you cded to the folder you want to copy, and the destination is ~/kiki.
You can just run
find . -type d -exec mkdir -p ~/kiki/{} \;
and you're done.
7Try without rsync:
The following will list all directory structure without files:
# find . -type dto add a prefix for each input line (not really useful as standalone command)
# sed 's/^/mkdir /'put it together:
# find . -type d | sed 's/^/mkdir /'creating the script, so you can create the Directory structure later:
# find . -type d | sed 's/^/mkdir /' > DirStructure.sh
# chmod +x DirStructure.shthen, run the script "./DirStructure.sh" in order to create the directory tree wherever you want, whenever you want.