archive

How do I tar a directory of files and folders without including the directory itself?

感情迁移 提交于 2019-12-04 07:17:59
问题 I typically do: tar -czvf my_directory.tar.gz my_directory What if I just want to include everything (including any hidden system files) in my_directory, but not the directory itself? I don't want: my_directory --- my_file --- my_file --- my_file I want: my_file my_file my_file 回答1: cd my_directory/ && tar -zcvf ../my_dir.tgz . && cd - should do the job in one line. It works well for hidden files as well. "*" doesn't expand hidden files by path name expansion at least in bash. Below is my

How can I tar files larger than physical memory using Perl's Archive::Tar?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 06:47:15
I'm using Perl's Archive::Tar module. Problem with it is it pulls everything on to the memory and the does archiving and then writes on to the file system so there is limitation on the maximum file size that can be archived. Most of the times it says out of memory. In case of GNU tar, it takes chunk of file, archives it and writes it on to the memory so it can handle files of any size. How can I do that using Perl's Archive::Tar module. It looks like there is a different module that doesn't use an in-memory structure: Archive::Tar::Streamed . The downside is that it requires tar to be

C/C++ Packing and Compression [closed]

耗尽温柔 提交于 2019-12-04 05:45:59
I'm working on a commercial project that requires a couple of files to be bundled (packed) into an archive and then compressed. Right now we have zlib in our utility library, but it doesn't look like zlib has the functionality to compress multiple files into one archive. Does anyone know of free libraries I'd be able to use for this? Amber Perhaps libtar ? Also under a BSD license. 7Zip has a full SDK for several languages including C and C++. The compression is extremely good, albeit not very fast. The code is licensed under the LGPL. You could use libzip - it's under a BSD-like licence so it

Unzipping with ExtractToDirectory method distorts non-latin symbols

余生长醉 提交于 2019-12-04 05:43:32
I have several folders with files, some folders contain non-latin symbols in their names (russian in my case). This folders are sending to zip archive (by windows explorer) in "D:\test.zip". Then I execute method ZipFile.ExtractToDirectory(@"D:\test.zip", @"D:\result"); and it successfully unzip all content, but all non-latin symbols turn into something wrong. For example, instead of "D:\result\каскады\file.txt" I got "D:\result\Є бЄ ¤л\file.txt" . Default encoding of my system is windows-1251 which I verified by involving Encoding.GetEncoding("windows-1251") into third parameter of

Is there an equivalent of gzip.open() for .7z files?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 05:41:29
I have to frequently search through a couple of .7z (zipped with LZMA) files. I don't have enough memory to have them unpacked at the same time or to change the archive to .gz. At the moment I unpack one, search for what I need, delete what was extracted, unpack the next. I want to go through the archives in the same way as with gzip: f = gzip.open('archive.gz') for i in f: do stuff Is there a module/way to do this with .7z files? There is a built in module in Python >= 3.3: http://docs.python.org/3.3/library/lzma And there is also a backport of the module on the PyPI: https://pypi.python.org

SQL Server Data Archive Solution

a 夏天 提交于 2019-12-04 05:27:49
I'm looking for a solution to archive data that exists in my database. My database is SQL Server 2008 and have approximately 250 tables. I search web and find the below link : http://www.dbazine.com/sql/sql-articles/charran13/ but this solution is not clear I don't know that is there a direct way for doing this in sql server. please give me a solution. The solution that you choose to rollout will be dependent on your reasons for implementing data archival. For example you will need to consider: What data is to be archived? For example all data or data older than a certain date? This has

Retrieving Archived messages from XMPP server in ios

冷暖自知 提交于 2019-12-04 03:43:40
I am integrating XMPP functionality in my ios app and i came across a problem i cannot solve. The problem is i cannot get archived messages from the server. My client is able to log in and i have tested several service calls (send, receive messages, getting info about a user) with success. Upon sending <iq type='get' id='pref1'> <pref xmlns='urn:xmpp:archive'/> </iq> The response is SEND: <iq type="get"><pref xmlns="urn:xmpp:archive"/></iq> RECV: <iq xmlns="jabber:client" type="error" to="1@iis2/ae76edc"><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns

7zip Self Extracting Archive (SFX) without administrator privileges

天涯浪子 提交于 2019-12-04 03:28:53
I use 7zip to create the SFX as follows: 7z.exe a -r archive.7z * Then I do a binary copy with the 7zS.sfx file (used to create a self extracting installer), config file "build.config", and the archive. The contents of config file are as follows: ;!@Install@!UTF-8! RunProgram="setup.exe" GUIMode="1" Path="%tmp%\\mytemp" ;!@InstallEnd@! Binary copy command is as follows: copy /b 7zS.sfx + build.config + archive.7z sfxInstaller.exe Problem is that the result SFX "sfxInstaller.exe" requires admin privileges for executing. Is it possible to generate Self Extracting Archives using 7-Zip that do not

Boost serialization: archive “unsupported version” exception

萝らか妹 提交于 2019-12-04 03:26:50
问题 I've got the exception "unsupported version" when I try to deserialize through a text archive some data previously serialized with a upper version of Boost (1.46 to serialize and 1.38 to deserialize)...is there a way to downgrade (in the code) the serialization? Something like "set_library_version"? 回答1: See the Error read binary archive, created by old Boost version mail archive post about the serialization error. It says that the code below does the job: void load_override(version_type & t,

Error when trying to create archive of iOS app: “Unable to create a provisioning profile because your team has no devices registered.”

我们两清 提交于 2019-12-04 01:52:40
问题 I am trying to create an archive of an iOS app with Xcode to submit it to the App Store. However, the following error message pops up when I select 'iOS Device' as target and click on Product - Archive: Unable to create a provisioning profile because your team has no devices registered in the Member Center. Please connect a device, enable it for development, and add it to the Member Center using the Organizer. The same error message also appears when I click the "Fix Issue" button on the app