Programmatically extract tar.gz in a single step (on Windows with 7-Zip)

Old question, but I was struggling with it today so here’s my 2c. The 7zip commandline tool “7z.exe” (I have v9.22 installed) can write to stdout and read from stdin so you can do without the intermediate tar file by using a pipe: 7z x “somename.tar.gz” -so | 7z x -aoa -si -ttar -o”somename” Where: … Read more

wbtc.cc.tar.zst [closed]

The extention .zst means that the archive is compressed by zstd. https://github.com/facebook/zstd The tar command has an option -I (–use-compress-program) to specify a command for compression/decompression. You can use it as follows. $ tar –use-compress-program=unzstd -xvf archive.tar.zst

Delete log files after x days

You could simply use the built-in archiving functionality. This setting will keep 7 old log files in addition to your current log. The cleanup is done by NLog automatically. <?xml version=”1.0″ ?> <nlog xmlns=”http://www.nlog-project.org/schemas/NLog.xsd” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”> <targets> <target name=”file” xsi:type=”File” layout=”${longdate} ${logger} ${message}” fileName=”${basedir}/logs/logfile.txt” archiveFileName=”${basedir}/logs/log.{#}.txt” archiveEvery=”Day” archiveNumbering=”Rolling” maxArchiveFiles=”7″ concurrentWrites=”true” /> </targets> <rules> <logger name=”*” minlevel=”Debug” writeTo=”file” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)