I love one-liners1 to make my life easier. Today I decided to clean up a directory full of CSV files, and compress them down. After all, a 2MB CSV file can be reduced quite substantially, and I had 300 of them.
Here it is, quite simply loops through the directory of CSVs, and zips the file up, keeping the name the same.
This all goes on a single line, but can easily be written out over multiple lines, like this:
1 2 3 4
Doing this reduced the folder size down from 600MB, to about 70MB, about an eighth the size.
a script that can be written onto a single line, and executed↩