Files not compressed by naming convention
Posted: Thu Jun 04, 2020 12:21 pm America/New_York
I had a job go bad, so I thought that the file I downloaded was corrupt. I tried again and it failed.
The name used in the curl call was the one given to me in my subscription area in 2018.
For some reason it was switched from bz2 to xz? Is this common?
So I did this with the given name ending in bz2:
curl -b ./.usr_cookies -c ./.usr_cookies -L -n --retry 5 --retry-delay 2 --max-time 0 --output ./MOD00.A2018161.1450_1.PDS.bz2 https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/MOD00.A2018161.1450_1.PDS.bz2 % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 275M 100 275M 0 0 3816k 0 0:01:13 0:01:13 --:--:-- 3970k
[bmurch@optics0 test]$ ll
total 281984
-rw-rw-r-- 1 bmurch usfuser 288711220 Jun 4 11:57 MOD00.A2018161.1450_1.PDS.bz2
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS.bz2
MOD00.A2018161.1450_1.PDS.bz2: xz compressed data
[bmurch@optics0 test]$ mv MOD00.A2018161.1450_1.PDS.bz2 MOD00.A2018161.1450_1.PDS.xz
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS.xz
MOD00.A2018161.1450_1.PDS.xz: xz compressed data
[bmurch@optics0 test]$ which xz
/usr/bin/xz
[bmurch@optics0 test]$ xz -d MOD00.A2018161.1450_1.PDS.xz
[bmurch@optics0 test]$ ll
total 667008
-rw-rw-r-- 1 bmurch usfuser 395212632 Jun 4 12:00 MOD00.A2018161.1450_1.PDS
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS
MOD00.A2018161.1450_1.PDS: data
The name used in the curl call was the one given to me in my subscription area in 2018.
For some reason it was switched from bz2 to xz? Is this common?
So I did this with the given name ending in bz2:
curl -b ./.usr_cookies -c ./.usr_cookies -L -n --retry 5 --retry-delay 2 --max-time 0 --output ./MOD00.A2018161.1450_1.PDS.bz2 https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/MOD00.A2018161.1450_1.PDS.bz2 % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 275M 100 275M 0 0 3816k 0 0:01:13 0:01:13 --:--:-- 3970k
[bmurch@optics0 test]$ ll
total 281984
-rw-rw-r-- 1 bmurch usfuser 288711220 Jun 4 11:57 MOD00.A2018161.1450_1.PDS.bz2
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS.bz2
MOD00.A2018161.1450_1.PDS.bz2: xz compressed data
[bmurch@optics0 test]$ mv MOD00.A2018161.1450_1.PDS.bz2 MOD00.A2018161.1450_1.PDS.xz
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS.xz
MOD00.A2018161.1450_1.PDS.xz: xz compressed data
[bmurch@optics0 test]$ which xz
/usr/bin/xz
[bmurch@optics0 test]$ xz -d MOD00.A2018161.1450_1.PDS.xz
[bmurch@optics0 test]$ ll
total 667008
-rw-rw-r-- 1 bmurch usfuser 395212632 Jun 4 12:00 MOD00.A2018161.1450_1.PDS
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS
MOD00.A2018161.1450_1.PDS: data