Hi! Just to clarify, are you looking for a command line option to check if the modification date / creation date on (filename).xz is newer than the modification date / creation date on (filename)? As of now, there is no such command line option to accomplish this, but it would be straightforward to wrap xz in a script to test for this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As of now, there is no such option to only overwrite the file based on a timestamp check. You can force overwrite as a work around with the -f , --force option to avoid throwing an error and aborting your script. This will not help with avoiding the extra time to extract your files. That would require an extra option that does not currently exist. If you have time and want to contribute this feature, it would be considered. Unfortunately, it is not a priority so I am not planning on working it anytime soon. I hope this helps!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
wget -N http://raspi.debian.net/daily/raspi_4_bullseye.img.xz
xz --keep -vv --decompress raspi_4_bullseye.img.xz
Is there an option to only decompress newer files?
Hi! Just to clarify, are you looking for a command line option to check if the modification date / creation date on (filename).xz is newer than the modification date / creation date on (filename)? As of now, there is no such command line option to accomplish this, but it would be straightforward to wrap xz in a script to test for this.
no, not the date of the .xy file, but the date of the files being extracted compared to what might be on disk.
I don't want this to happen:
xz: 2022-04-04-raspios-bullseye-armhf-lite.img: File exists
This throws an error, and aborts my script.
also these are big files, so I would rather not take the time to extract just to find out I didn't need to.
As of now, there is no such option to only overwrite the file based on a timestamp check. You can force overwrite as a work around with the -f , --force option to avoid throwing an error and aborting your script. This will not help with avoiding the extra time to extract your files. That would require an extra option that does not currently exist. If you have time and want to contribute this feature, it would be considered. Unfortunately, it is not a priority so I am not planning on working it anytime soon. I hope this helps!