开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜