2

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

0

1 Answer 1

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.

1
  • Alternatively, find -type d will show just the directory structure which could then be reproduced elsewhere with mkdir -p.
    – chronitis
    Jul 24, 2013 at 20:16

Not the answer you're looking for? Browse other questions tagged .