Is there a way to not only find but also delete any .gz files inside a .tar.gz file? I found this link but I wouldn't know how to modify it to make it able to delete found files.
I have multiple files in a directory. Each file will have a header.I have to check if any of the files has 0 rows other than the header then I have to delete the files.
Here Empty file in my case means a file has header information but no data.
Chance is that there will be empty files (zero byte files) and empty directories (that doesn’t contain any files) in your system. In this article, I will show you how to locate these empty directories and files and delete them.
The command you can use is the "find" command. To find empty directories in the current directory, you use the option -empty: