Tutorial by Examples: archive

It is considered good practice to use a prefix when creating git archives, so that extraction will place all files inside a directory. To create an archive of HEAD with a directory prefix: git archive --output=archive-HEAD.zip --prefix=src-directory-name HEAD When extracted all the files will be...
It is also possible to create archives of other items than HEAD, such as branches, commits, tags, and directories. To create an archive of a local branch dev: git archive --output=archive-dev.zip --prefix=src-directory-name dev To create an archive of a remote branch origin/dev: git archive --...
With git archive it is possible to create compressed archives of a repository, for example for distributing releases. Create a tar archive of current HEAD revision: git archive --format tar HEAD | cat > archive-HEAD.tar Create a tar archive of current HEAD revision with gzip compression: gi...
Unzipping a zip archive is done with unzip function from the utils package (which is included in base R). unzip(zipfile = "bar.zip", exdir = "./foo") This will extract all files in "bar.zip" to the "foo" directory, which will be created if necessary. Tilde...
Listing files in a zip archive is done with unzip function from the utils package (which is included in base R). unzip(zipfile = "bar.zip", list = TRUE) This will list all files in "bar.zip" and extract none. Tilde expansion is done automatically from your working directory. ...
Listing files in a tar archive is done with untar function from the utils package (which is included in base R). untar(zipfile = "bar.tar", list = TRUE) This will list all files in "bar.tar" and extract none. Tilde expansion is done automatically from your working directory. ...
Extracting files from a tar archive is done with untar function from the utils package (which is included in base R). untar(tarfile = "bar.tar", exdir = "./foo") This will extract all files in "bar.tar" to the "foo" directory, which will be created if nece...
System.IO.Compression.ZipFile.CreateFromDirectory("myfolder", "archive.zip") Create archive.zip file containing files which are in myfolder. In example paths are relative to program working directory. You can specify absolute paths.
System.IO.Compression.ZipFile.ExtractToDirectory("archive.zip", "myfolder") Extracts archive.zip to myfolder directory. In example paths are relative to program working directory. You can specify absolute paths.
' Create filestream to file Using fileStream = New IO.FileStream("archive.zip", IO.FileMode.Create) ' open zip archive from stream Using archive = New System.IO.Compression.ZipArchive(fileStream, IO.Compression.ZipArchiveMode.Create) ' create file_in_archive.txt in arch...
Build: xcodebuild -exportArchive -exportFormat ipa \ -archivePath "/Users/username/Desktop/MyiOSApp.xcarchive" \ -exportPath "/Users/username/Desktop/MyiOSApp.ipa" \ -exportProvisioningProfile "MyCompany Distribution Profile" Archive: xcodebuild -pro...
There is an example for extract a folder from an archive in the current location : tar -xf archive-name.tar If you want to extract a folder from an archive to a specfic destination : tar -xf archive-name.tar -C ./directory/destination
There is an example of listing content : tar -tvf archive.tar The option -t is used for the listing. For listing the content of a tar.gz archive, you have to use the -z option anymore : tar -tzvf archive.tar.gz
You can use the archivesBaseName to set the name of apk. For example: defaultConfig { .... project.ext.set("archivesBaseName", "MyName-" + defaultConfig.versionName); } You will obtain this output. MyName-X.X.X-release.apk
To create new archive open zipfile with write mode. import zipfile new_arch=zipfile.ZipFile("filename.zip",mode="w") To add files to this archive use write() method. new_arch.write('filename.txt','filename_in_archive.txt') #first parameter is filename and second parameter i...
Once the provisioning profiles are all set, next step in the process of submitting the app is to archive your code. From the dropdown of devices and simulators select option "Generic iOS device". Then, under "Product" menu select option "Archive". In case where the s...
List the contents of an archive file without extracting it: tar -tf archive.tar.gz Folder-In-Archive/ Folder-In-Archive/file1 Folder-In-Archive/Another-Folder/ Folder-In-Archive/Another-Folder/file2
With a simple for loop, all zip archives in a directory can be extracted. for (i in dir(pattern=".zip$")) unzip(i) The dir function produces a character vector of the names of the files in a directory matching the regex pattern specified by pattern. This vector is looped through w...
Note: These instructions are targeted at .NET Core 1.0.4 & 1.1.1 SDK 1.0.1 and higher. When using binary archives to install, we recommend the contents be extracted to /opt/dotnet and a symbolic link created for dotnet. If an earlier release of .NET Core is already installed, the directory and ...
Compress-Archive -Path C:\Documents\* -CompressionLevel Optimal -DestinationPath C:\Archives\Documents.zip This command: Compresses all files in C:\Documents Uses Optimal compression Save the resulting archive in C:\Archives\Documents.zip -DestinationPath will add .zipif not present. -Li...

Page 1 of 2