How to add man and zip to git bash installation on Windows
2016: The zip
command can be installed from GoW (Gnu On Windows). man
is not provided (too big).
It is to note, however, that if you only want to add the zip
command from GoW, still the whole GoW system has to be downloaded and installed. Then you can delete the other commands from the bin
directory, however make sure to keep the needed dlls in the directory.
Update 2021: tar/zip are by default installed on Windows 10.
7-zip based solutions are available below.
GitLab Pipelines: zip: command not found after installing zip on docker image?
Correct script below:
build:
stage: build
script:
- apt-get install zip unzip
- yarn install
- ./node_modules/@angular/cli/bin/ng build --prod
- cd dist/AngularTemplate; zip -r ../../dist.zip *; cd ..; cd..
artifacts:
paths:
- dist.zip
Was installing the wrong Zip package and then puttin my archive in the wrong folder.
zip command not zipping files in shell script
zip expects file args, and the file type can be a directory.
The example zip command did what it was told: archive 1 directory, not the contents of that dir.
Try -r or --recurse-paths, eg:
zip -r $NUMBER.NEW.$NAME.zip test
How to zip a file using cmd line?
If you are using Ubuntu Linux:
Install
zip
sudo apt-get install zip
Zip your folder:
zip -r {filename.zip} {foldername}
If you are using Microsoft Windows:
Windows does not come with a command-line zip program, despite Windows Explorer natively supporting Zip files since the Plus! pack for Windows 98.
I recommend the open-source 7-Zip utility which includes a command-line executable and supports many different archive file types, especially its own *.7z
format which offers superior compression ratios to traditional (PKZIP) *.zip
files:
Download 7-Zip from the 7-Zip home page
Add the path to
7z.exe
to yourPATH
environment variable. See this QA:
How to set the path and environment variables in WindowsOpen a new command-prompt window and use this command to create a PKZIP
*.zip
file:7z a -tzip {yourfile.zip} {yourfolder}
Cross-platform Java:
If you have the Java JDK installed then you can use the jar
utility to create Zip files, as *.jar
files are essentially just renamed *.zip
(PKZIP) files:
jar -cfM {yourfile.zip} {yourfolder}
Explanation:
* -c compress
* -f specify filename
* -M do not include a MANIFEST file
how can I run zip through cmd, where it's not found?
You need to install the aplication. Later, add the folder where is located to your system PATH environment variable.
Issue when creating zip file from directory
From the zip
help:
zip(zipfile, files, flags = "-r9X", extras = "",
zip = Sys.getenv("R_ZIPCMD", "zip"))zip A character string specifying the external command to be used.
As you can see, the zip
function has an argument zip
to specify the external command to be used. On my machine it is:
λ where zip
C:\Oracle\Ora11\BIN\zip.exe
C:\Program Files\Rtools\bin\zip.exe
The zip
program is available in Rtools, but it is also available on any (Windows?) machine, usually.
To check whether zip
is found by R, type:
> Sys.which("zip")
zip
"C:\\Oracle\\Ora11\\bin\\zip.exe"
If you get ""
, that means zip
is not in the path, and if it is neither in the environment variable R_ZIPCMD
, you have to specify its path in the zip
argument.
Related Topics
Do_Install Error While Running Custom Bitbake in Poky Build
How to Install Google Test on Ubuntu Without Root Access
Setting Process Name (As Seen by 'Ps') in Go
How Is a Memory Barrier in Linux Kernel Is Used
In Linux, How to Find Find Directory with The Most Subdirectories or Files
How to Set Control Register 0 (Cr0) Bits in X86-64 Using Gcc Assembly on Linux
Busybox in Embedded Linux Shows "Applet Not Found"
Finding Threading Bottlenecks and Optimizing for Wall-Time with Perf
Embedding an Application (In This Case a Terminal) Within a Qt Application
Eclipse Doesn't Use The Path Set in .Bashrc
Automatically Sync Two Amazon S3 Buckets, Besides S3Cmd
Scsi Read (10) and Write (10) with The Scsi Generic Interface
Linux of Equivalent Cryptprotectmemory
How to Take Advantage of The Vdso Object with Your Own Programming Language
Linux: Disable Using Loopback and Send Data via Wire Between 2 Eth Cards of One Comp