I'm in a folder: /var/myfolder. Inside there are some other folders like: /var/myfolder/A/ /var/myfolder/B/ `/var/myfolder/C/ etc. Inside each there are some files with random names. How do I remove all the files from all the folders inside /var/myfolder? The structure (all the directories, eg., A, B, C etc., inside /var/myfolder) should remain intact.
How to remove only the content of directories?
shell;files
Try:find /var/myfolder -type f -deleteThis gets all the regular files under /var/myfolder and deletes them leaving only the directories.