2

Is there a way to exclude all files, in all subfolders, and keep the folder structure?

muru
  • 193,181
  • 53
  • 473
  • 722
The Student
  • 11,786
  • 27
  • 61
  • 94

1 Answers1

2

I presume you want to delete them...

find -type f -delete

This will delete all files in the current folder and all subfolders but leave the directories intact.

Adrian
  • 5,196
  • 16
  • 28
  • Alternatively, `find -type d` will show just the directory structure which could then be reproduced elsewhere with `mkdir -p`. – chronitis Jul 24 '13 at 20:16