tar

What exactly is the GNU tar ././@LongLink “trick”?

跟風遠走 提交于 2019-12-03 02:10:35
I read that a tar entry type of 'L' (76) is used by gnu tar and gnu-compliant tar utilities to indicate that the next entry in the archive has a "long" name. In this case the header block with the entry type of 'L' usually encodes the name ././@LongLink . My question is: where is the format of the next block described? The format of a tar archive is very simple: it is just a series of 512-byte blocks. In the normal case, each file in a tar archive is represented as a series of blocks. The first block is a header block, containing the file name, entry type, modified time, and other metadata.

Capistrano error tar: This does not look like a tar archive

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: INFO [050fe961] Running mkdir -p /home/rails/rails- capistrano/releases/20140114234157 on staging-rails DEBUG [050fe961] Command: cd /home/rails/rails-capistrano/repo && ( PATH=/opt/ruby/bin:$PATH GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rails/git-ssh.sh mkdir -p /home/rails/rails-capistrano/releases/20140114234157 ) INFO [050fe961] Finished in 0.142 seconds with exit status 0 (successful). INFO [2dea2fe5] Running git archive feature/Capistrano | tar -x -C /home/rails/rails-capistrano/releases/20140114234157 on staging-rails DEBUG [2dea2fe5]

How to replace the pointer to the overridden (virtual) method in the pointer of my method? (Release x64 and x86)

匿名 (未验证) 提交于 2019-12-03 02:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In question Dynamically replace the contents of a C# method? I found a good response from @ Logman. I do not have standing to ask it in the comments. using System; using System.Reflection; using System.Runtime.CompilerServices; namespace ReplaceHandles { class Program { static void Main(string[] args) { Injection.replace(); Target target = new Target(); target.test(); Console.Read(); } } public class Injection { public static void replace() { MethodInfo methodToReplace = typeof(Target).GetMethod("test", BindingFlags.Instance | BindingFlags

Performing grep operation in tar files without extracting

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have list of files which contain particular patterns, but those files have been tarred. Now I want to search for the pattern in the tar file, and to know which files contain the pattern without extracting the files. Any idea...? 回答1: the tar command has a -O switch to extract your files to standard output. So you can pipe those output to grep/awk tar xvf test.tar -O | awk '/pattern/{print}' tar xvf test.tar -O | grep "pattern" eg to return file name one pattern found tar tf myarchive.tar | while read -r FILE do if tar xf test.tar $FILE -O

How to extract filename.tar.gz file

左心房为你撑大大i 提交于 2019-12-03 01:50:55
问题 I want to extract an archive named filename.tar.gz . Using tar -xzvf filename.tar.gz doesn't extract the file. it is gives this error: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error exit delayed from previous errors 回答1: If file filename.tar.gz gives this message: POSIX tar archive, the archive is a tar, not a GZip archive. Unpack a tar without the z , it is for gzipped (compressed), only: mv filename.tar.gz filename.tar # optional tar xvf filename.tar Or try a

Node.js - Zip/Unzip a folder

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm diving into Zlib of node.js. I was able to compress and uncompress files using the provided examples ( http://nodejs.org/api/zlib.html#zlib_examples ) but I didn't be able to find more about doing the same for folders? One possibility (but that I consider as tinkering) is to use node-zip module and adding all the files of the folder one by one. But I'll face a problem when uncompressing (I will lose the folders in this case). Any idea how to compress (and then uncompress) a whole folder (respecting the sub-solders hierarchy) using Node

tar over ssh: Set destination file name and location, and overwrite existing [closed]

匿名 (未验证) 提交于 2019-12-03 01:46:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The easiest way to explain this question is show the following line of code which I have in a bash script. tar - cJf - ./ my_folder | ssh user@example 'tar -xJf - && rm -r ./path-to-my_folder/my_folder && mv ./my_folder ./path-to-my_folder' I don't fully understand how it works. (What does '-' mean in this context?) But this is what it does: Creates a compressed tar archive in memory and the pipe somehow pushes the tar data over ssh The tar archive appears in user s root folder, it is extracted The ssh command continues executing

How can I build a tar from stdin?

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I pipe information into tar specifying the names of the file? 回答1: Something like: tar cfz foo.tgz -T - But keep in mind that this won't work for all possible filenames; you should consider the --null option and feed tar from find -print0 . (The xargs example won't quite work for large file lists because it will spawn multiple tar commands.) 回答2: As already pointed out by geekosaur, there is no need to pipe the output of find to xargs because it is possible to pipe the output of find directly to tar using find ... -print0 | tar -

Table is specified twice, both as a target for 'UPDATE' and as a separate source for data

匿名 (未验证) 提交于 2019-12-03 01:11:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use spring-jpa with hibernate implementation. I use mariadb and I try to do an update subquery My object structure @Entity public class Room { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long roomId; @ManyToOne @JoinColumn(name = "appartment_id") private Appartment appartment; } @Entity public class Appartment { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long appartmentId; @OneToMany @JoinColumn(name="appartment_id") private Set<Room> roomList; } update Room r1 set r1.available = :availability where r1

Table is specified twice, both as a target for &#039;UPDATE&#039; and as a separate source for data

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use spring-jpa with hibernate implementation. I use mariadb and I try to do an update subquery My object structure @Entity public class Room { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long roomId; @ManyToOne @JoinColumn(name = "appartment_id") private Appartment appartment; } @Entity public class Appartment { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long appartmentId; @OneToMany @JoinColumn(name="appartment_id") private Set<Room> roomList; } update Room r1 set r1.available = :availability where r1