Skip to content

Instantly share code, notes, and snippets.

@sp00nman
Created March 28, 2017 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sp00nman/8ca6a103d009f382f33ef48b7be3e787 to your computer and use it in GitHub Desktop.
Save sp00nman/8ca6a103d009f382f33ef48b7be3e787 to your computer and use it in GitHub Desktop.
Zip *.fastq (or any file) in directory
# Credits to Michael Schuster for this useful onliner
# find . -name '*.fastq' finds all fastqs in current directory
# -print --> print the processed files
# -exec gzip --best {} --> the gzip command for each file; gzips the file (keeps timestamp) and removes the orginial
# \ --> escapes the semicolon from bash
# ; --> end of exec command line
find . -name '*.fastq' -print -exec gzip --best {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment