开发者

How to delete content from all files within a given folder preserving the names?

开发者 https://www.devze.com 2023-01-24 13:02 出处:网络
I want to delete content from every file within a folder (Which includes files in all the sub folders and sub-sub-folders etc.) What is the best possible way to do the same?

I want to delete content from every file within a folder (Which includes files in all the sub folders and sub-sub-folders etc.) What is the best possible way to do the same?

Alternatively, Is there a way t开发者_如何学Co copy only the file names (Empty files) and structure from a given folder?


find folder/to/frob -type f -exec sh -c '> "{}"' \;
0

精彩评论

暂无评论...
验证码 换一张
取 消