Delete all the files under a directory, keep the directory structure

zhaozj2021-02-17  94

Delete all the files under a directory, keep the directory structure

linuxman

Back to〗 Forward〗

Delete all files in a directory, and presented the list of directory structure: Sometimes we need to delete all the files under a directory, but keep the directory structure specific description: Delete: | ---- File1 | ----- File2 | ----- | | ------- File3 | | ------- File4 | ------ Delete: | ----- | ---- Use the command: Find. -Type f -exec rm {}; Linuxman@263.net Editor: Knowledge Base Admin (2001-02-21 15:

转载请注明原文地址:https://www.9cbs.com/read-31598.html

New Post(0)