What is a difference between zip and tgz format? - zip

I want to install scala at here and I'm concerned about which one to download: zip or tgz. What is a difference between these, and what are the use cases?

They are different archive formats. They are used because it saves bandwidth and because they bundle files.
Zip is more common on Windows and there is a decompressor preinstalled.
Tgz is gzip + tar and is common on Linux. There is also a decompressor preinstalled, most of the time. Also known as .tar.gz.
If you're on Windows I'd download the zip or the installer, as you don't have to install a third party program to open it. If you're on Linux I recommend installing scala through your package manager.

Related

Unable to extract shape_predictor_68_face_landmarks.dat for bz

I am trying to run some face frontalization code (using Python3 on Windows10), the code uses opencv and dlib and requires a file called shape_predictor_68_face_landmarks.dat. The code tries to automatically download it and then unzip it but it fails to unzip giving an unexpected end of archive error. I tried to use WinRaR to repair the file (which I also tried manualy downloading from http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2) but it says it can only repair .zip and .rar files.
Does anyone know where I can download the uncompressed .dat file from? Or alternatively how I can repair a damaged .bz file in Windows?
The file is available at
http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
I downloaded it and verified that extraction works. The file is smaller than the one used in the previous version, but I think that is due to improvements.
In case this does not work, let me (or Davis King, who maintains the dlib blog) know so that you can get the uncompressed version.
Downloading using the CLI is a lot easier.
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
To decompress the compressed file you just downloaded, use the following command
bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
As mentioned above, download shape_predictor_68_face_landmarks.dat
from here. But while downloading, downloads gets failed(i faced this issue). So, if you're also facing the same issue, then i recommend to download it via command-line:
$ wget link

NodeJS archive manager

I need to get the content of archives and then I want to uncompress the selected one - but I dont want to uncompress the archives to know what's in it. I'd like to list and uncompress at least zip and rar, but (if that's possible) I don't want to be limited to only these two.
Can you advise good npm modules or other projects to achieve this?
Here's what I came up with:
zip
I found node-zip can only unzip files, but not list archive content.
rar
The best solution seems node-rar, but I can't install it on Windows.
node-uncompress This does what it says: It's an "Command-line wrapper for uncompressing various file types." So there is again no possibility to list archive content.
Currently I try to get node-uncompress to list files and hopefully it must never run cross-platform.
Solution:
I am now using 7zip with the node module node-7z instead of trying to get every archive working on its own. The corresponding site is: https://www.npmjs.com/package/node-7z
This library uses the OS independent archive manager 7zip. On Windows 7za is used. "7za.exe (a = alone) is a standalone version of 7-Zip". I've tested it on Windows and Ubuntu and it works great.
Update:
At Windows: Somehow I just got it working by adding 7za to the Path variables - not by adding 7za.exe to the "the same directory of your package.json file." like the description says.
Update 2:
On Windows 7za, that's referred in the node-7z post, cannot handle .rar-archives. So I'm using the "casual" 7-zip instead of 7za.exe. I just renamed the commanline 7z.exe to 7za.exe and added the 7-zip folder to the Path Variables.

Removing RPM Packages

Hello experts and thank you for taking your time to answer the question:
Can I remove the .rpm files after having installed the program?
EXAMPLE:
I have installed the rar.rpm file and now I have the rar.rpm in a directory where I downloaded the file and want to know if I could remove that file without disrupting the rar program's function in centos.
Regards
Sam
Yes, you can.
Though you may want to keep it in case you need to install it again.
Also, in general, you shouldn't be (and shouldn't need to) use randomly downloaded .rpm files.
You should usually be using yum or similar tool to install a package from the configured repositories on the system.

Minimal Cygwin installation + Perl + Gcc

I would like to have a specific Cygwin installation as one zip-file archive in order to deploy then on different Windows PCs. After investigating the problem the suggested way to perform this is "trial-and-error" Cygwin installation and packages choosing (What packages should I install with Cygwin to make it not bloated but also have everything I would need as a developer?)
May be more concrete requirement will help: I need minimal Cygwin installation + Perl + famous Perl libraries (Win32::API, etc) + GNU make + Gcc compilation tools. Which packages should I select when installing Cygwin?
I have been experimenting with Cygwin attempting to get a "bare-bones", minimal install. I do find that installing utilities like grep, gawk, sed and similar tools has dependencies on cygwin, base-Cygwin and sometimes unwanted tools like bash, coreutils etc.,
I wanted to get only the tools and their required dlls installed and started examining the Cygwin package. I discovered that not using the setup.exe supplied by Cygwin is an alternative way to accomplish minimal Cygwin installs.
And this is how I got it done.
Download only the packages you want from any of the Cygwin mirror
sites using ftp or http. Alternatively you can use the setup.exe
supplied by Cygwin to download all the packages - download only and
no install.
Once the download is successfully completed, individual
packages like zlib, gawk, grep, libiconv are found under the
x86/release or x86_64/release directory Each package is 'tar'red and
compressed using tool 'xz' or bzip and stored in respective
directories.
To install a specific tool like sed or gawk, all that
needs to be done, is to extract the tool executable and its
dependencies (.dll)
Before you attempt the following, please ensure you have a tool like 7z.exe, xz.exe, bzip2 or other that is capable of uncompressing an .xz or bzip archive
Installing gawk example below :
Extract gawk.exe from gawk-4.1.3-1.tar.xz archive using the command - 7z.exe e -so gawk-4.1.3-1.tar.xz | tar xvf -
Once that is done, you should find gawk.exe in a subfolder usually, usr/bin under the release/gawk folder
Find the dependencies for gawk - you can do this in a couple of ways.
Examine the Cygwin setup.ini file found in x86 or x86_64 folder.
Look the string '# gawk' and in the lines after this line you should find a "requires:" line that lists the dependencies.
Mine reads like this - "requires: bash cygwin libgmp10 libintl8 libmpfr4 libreadline7"
For gawk to run, bash is not a must since we have the windows command shell. (bash is included to get a few other dlls required by gawk. However, that causes a lot more unecessary files to be installed). The other dependencies contain files that gawk needs to run.
Extract each of the above packages using tools like 7z or xz into individual files.
After all the dependencies are extracted, copy your needed tool(s) (grep/sed/gawk) to a folder and all the dependent .dlls
You should now be able to run your tool with the minimum set of .dlls required in a bare-bones cygwin installation.
Caution : It may not be sufficient to just extract the dependencies listed in setup.ini for each tool. Sometimes, you may need to execute/run the tool to discover that there are more dlls required.
There are other means of finding out the dlls required by an .exe - you can use dumpbin from MS or dependency walker, ndepends or similar tools to find the list of dependent dlls
Consult - How do I detect the DLLs required by an application?
How do I find out which dlls an executable will load?
I also brute forced this dll info by just running the tool and installing the missing dlls listed one by one by extracting from the required packages.
When you run a tool and it errors out with a missing .dll message, search for the package that contains the dll here - https://cygwin.com/cgi-bin2/package-grep.cgi . Enter the full/partial name of the missing dll to find the name of the package containing the dll.
Eventually, I have ended up with a bare-bones cygwin install with only the tools and dlls that I need.
Example : gawk - gawk.exe and the following dlls - cygwin1.dll, cyggmp-10.dll, cygiconv-2.dll, cygintl-8.dll, cygmpfr-4.dll, cyggcc_s-seh-1.dll, cygncursesw-10.dll, cygreadline7.dll
sed - sed.exe and dlls - cygwin1.dll, cygintl-8.dll
Hope this is found useful. The Cywin installer also does dll re-basing, which I will not venture into here.
With Cygwin's dependence system, you should just make a new installation, unselect every package, and then select Perl, make and gcc, and it will install only the required packages for that. I think some of the dependent packages are just recommended and not required, but the Cygwin installer conveniently marks them as recommended.

Where's solaris 11 's pkg install package downloaded path?

I use pkg install gcc-3 in solaris 11 to install gcc 3. Where did pkg store the downloaded package install files / gcc-3.pkg file?
I tried /etc/pkg/, only get some useless mako file there.
I can see the pkg thread downloading the file, is there any way to monitor I/O status in solaris and get the path the pkg process is writing to? iostat seems only give the io rate and not the actually path.
It caches downloaded files under /var/pkg but the exact paths are usually hashes and not generally useful. It doesn't download a complete copy of the package, but only the files you need that aren't already located or cached on the system, so that upgrades to new versions are usually much faster, because they only download changed files.

Resources