Linux command to delete empty fastq.gz files

Linux command to delete empty fastq.gz files

1

Hi all,

I am wondering how to use Linux command to remove all the fastq.gz files within a folder.

As the compressed fastq.gz has a size of 20 bytes even if it’s empty after decompressing, I am not sure how to delete (and list) them.

I tried to list them when I was in the folder – but somehow find . -size 20 returned nothing. However, ls -l did tell me there were a bunch of size 20 fastq.gz files.

Here is an example of a set of “empty” fastq.gz files:

 gzip --list xxxxxxx.gz
         compressed        uncompressed  ratio uncompressed_name
                 20                   0   0.0% xxxxxxx.fastq

Thank you so much!


linux


fastq


gz

• 70 views

Source link