tar

Maven assembly plugin not creating tar files with directory entries?

瘦欲@ 提交于 2020-01-04 05:05:24
问题 I'm working on my first Maven project which will ultimately package a Java app in a Debian package (using the jdeb plugin). I'm trying to use the assembly plugin to build a tar file, but it looks like the generated file does not always include directory entries, which will cause dpkg install to fail. Has anyone seen this before? Specifically, the generated tar file does not include directory entries for: a fileSet that specifies <includes> (leaving <includes> will result in a directory entry

can't untar a complete directory using tar -cvpzf

◇◆丶佛笑我妖孽 提交于 2020-01-04 02:47:13
问题 Banging my head on this one... I used tar -cvpzf file.tar.gz to compress a complete directory. I move the file to another server and i try to decompress the directory where i have copied the archive. Can't make it work. bash-3.2$ tar -xvpzf news.tar.gz . tar: gzip: Cannot exec: No such file or directory tar: Error is not recoverable: exiting now tar: Child returned status 2 tar: .: Not found in archive tar: Error exit delayed from previous errors Anyone ? 回答1: Your tar can't find gzip. If you

How to tell what directory was created by ansible's unarchive module?

耗尽温柔 提交于 2020-01-03 07:09:08
问题 I'm writing an ansible playbook to automate the installation of a piece of software. When I download the tarball from the website I have: software-package-release.tar.gz When untarred I'm left with the directory software-package-v2.15/ Does ansible have any way of registering the directory created as part of the unarchive module? I've tried with the following plays (I put the nrpe-lkdsflkdjf file there which contains a dir nrpe-2.15 ) - name: Extract unarchive src:/tmp/nrpe-lkdsflkdjf dest:

Extract files to same folder as archive using recursive to search all directories

僤鯓⒐⒋嵵緔 提交于 2020-01-03 05:19:07
问题 I'm working on an automation task in PowerShell that extracts the contents of several .tar archives to their respective subfolders using recursion and the 7z.exe utility. Im running into an issue where the output dumps in my working directory instead of the subdirectory gci -r found the original tarball. So far I have: $files=gci -r | where {$_.Extension -match "tar"} foreach ($files in $files) { c:\7z.exe e -y $file.FullName } Advice on setting the working directory within the loop or 7z

查找有序数组中第一个大于target的数字

两盒软妹~` 提交于 2020-01-02 18:24:29
class Solution { public int searchInsert ( int [ ] nums , int target ) { int left = 0 ; int right = nums . length - 1 ; while ( left <= right ) { int mid = ( left + right ) / 2 ; if ( nums [ mid ] > target ) { right = mid - 1 ; } else if ( nums [ mid ] <= target ) { left = mid + 1 ; } } return left ; } } 来源: CSDN 作者: k7_silent 链接: https://blog.csdn.net/k7_slient/article/details/103807440

Linux ==> 压缩与打包

旧巷老猫 提交于 2020-01-02 11:26:03
压缩与打包 Linux 底下有很多压缩文件名,常见的如下: 扩展名 压缩程序 *.Z compress *.zip zip – – *.gz gzip *.bz2 bzip2 *.xz xz *.tar tar 程序打包的数据,没有经过压缩 *.tar.gz tar 程序打包的文件,经过 gzip 的压缩 *.tar.bz2 tar 程序打包的文件,经过 bzip2 的压缩 *.tar.xz tar 程序打包的文件,经过 xz 的压缩 压缩指令 gzip $ gzip [ -cdtv #] filename -c :将压缩的数据输出到屏幕上 -d :解压缩 -t :检验压缩文件是否出错 -v :显示压缩比等信息 - # : # 为数字的意思,代表压缩等级,数字越大压缩比越高,默认为 6 bzip2 提供比 gzip 更高的压缩比。 查看命令:bzcat、bzmore、bzless、bzgrep $ bzip2 [ -cdkzv #] filename -k :保留源文件 xz 查看命令:xzcat、xzmore、xzless、xzgrep. $ xz [ -dtlkc #] filename 打包 压缩指令只能对一个文件进行压缩,而打包能够将多个文件打包成一个大文件。tar 不仅可以用于打包,也可以使用 gzip、bzip2、xz 将打包文件进行压缩。 $ tar [ -z |

word,excel,ppt转pdf

☆樱花仙子☆ 提交于 2020-01-01 22:10:24
第一步 需要下载jar包和jacob-1.14.3-x64.dll * <dependency> * <groupId>net.sf.jacob-project</groupId> * <artifactId>jacob</artifactId> * <version>1.14.3</version> * </dependency> *第二步 把jacob-1.14.3-x64.dll 放到java/bin目录下 电脑环境 win10 office2016支持文件类型 doc,docx,xls,xlsx,ppt,pptx 下面是源代码package com.example.demo.xs;import com.jacob.activeX.ActiveXComponent;import com.jacob.com.Dispatch;import com.jacob.com.Variant;import java.io.File;import java.util.logging.Level;import java.util.logging.Logger;/** * 需要jar包和jacob-1.14.3-x64.dll * <dependency> * <groupId>net.sf.jacob-project</groupId> * <artifactId>jacob<

How to create a tar file that omits timestamps for its contents?

拈花ヽ惹草 提交于 2020-01-01 04:19:09
问题 Is there a way to create a .tar file that omits the values of atime/ctime/mtime for its files/directories? Why do we want to do this? We have a step in our build process that generates a directory of artifacts that gets packaged into a tarfile. We expect that build step to be idempotent -- given the same inputs, it produces exactly the same files/output each time. Ideally, we would like also like the step to be bitwise idempotent across clean builds, so that we can use hashes of successive

How to implement a Lua container (virtual file system) module loader in C#

时光怂恿深爱的人放手 提交于 2020-01-01 03:41:28
问题 Sounds a little bit scary isn't it? Some background information, I want to load a tar archive which contains some lua modules into my C# application using LuaInterface. The easiest way would be to extract these files to a temp folder, modify the lua module search path and read them with require as usual. But I do not want to put these scripts somewhere on the file system. So I thought it should be possible to load the tar-archive with the #ziplib I know there are a lot of lua implementations

**linux Ubuntu 压缩和解压缩**

懵懂的女人 提交于 2019-12-31 23:09:08
linux Ubuntu 压缩和解压缩 c:创建 x:提取 z:以zip方式压缩 j:以bzip2压缩 f:表示文件 压缩: tar czf dirA.tar.gz dirA tar cjf dirA.tar.bz2 dirA 解压 tar xzf dirA.tar.gz -C dir tar xjf dirA.tar.bz2 -C dir 来源: CSDN 作者: 晚情 链接: https://blog.csdn.net/zhouchunxia/article/details/103765685