tar

How to install Go in alpine linux

无人久伴 提交于 2020-06-24 08:11:22
问题 I am trying to install Go inside an Alpine Docker image. For that I downloaded tar file from here inside my alpine docker image, untar it using following command: tar -C /usr/local -xzf go1.10.3.linux-amd64.tar.gz exported PATH to have go binary as: export PATH=$PATH:/usr/local/go/bin However, when I say go version then it says that sh: go: not found . I am quite new to alpine. Does anyone know, what I am missing here? Steps to reproduce- $ docker run -it alpine sh $ wget https://dl.google

file decompression error during kafka installation with chef

笑着哭i 提交于 2020-06-23 14:49:48
问题 I'm trying to install kafka using the supermarket recipe as my starting point. But when I run kitchen converge it gives me the following error. It should be something inherent in the archive. What do you think?platform kitchen ubuntu 14.04 tar version 1.27.1 execute 'kafka-install' do cwd node['kafka']['install_dir'] command <<-EOH wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && \ tar -zxf kafka_2.12-2.5.0.tgz && \ useradd -M #{node['kafka']['user']} && \ chown #{node[

add a directory when creating tar archive

末鹿安然 提交于 2020-06-12 08:00:07
问题 I want to tar some files (and directories) but want to create an additional directory those files should reside in. So for example for the following directory structure: myproject + file1 + file2 + subdir1 + file3 I cd into the myproject directory and want to create the tar archive tar czf myproject.tgz --place-into-dir myproject-1.0 file2 subdir1 to receive a tar archive with the following content: myproject-1.0 + file2 + subdir1 + file3 I am searching for an option like my fictional "-

Get file names of tarred folder contents in Python

戏子无情 提交于 2020-05-30 06:32:19
问题 I have a compressed folder called gziptest.tar.gz which contains several plaintext files. I'd like to be able to get the filenames and corresponding contents of the files, but the examples of usage for the gzip library don't cover this. The following code: import gzip in_f = gzip.open('/home/cholloway/gziptest.tar.gz') print in_f.read() produces the output: gzip test/file2000664 001750 001750 00000000016 12621163624 015761 0ustar00chollowaycholloway000000 000000 I like apples gzip test

Python3 working with csv files in tar files

懵懂的女人 提交于 2020-05-27 15:48:14
问题 I am trying to work with csv files contained in a tar.gz file and I am having issues passing the correct data/object through to the csv module. Say I have a tar.gz file with a number of csv files formated as follows. 1079,SAMPLE_A,GROUP,001,,2017/02/15 22:57:30 1041,SAMPLE_B,GROUP,023,,2017/02/15 22:57:26 1077,SAMPLE_C,GROUP,005,,2017/02/15 22:57:31 1079,SAMPLE_A,GROUP,128,,2017/02/15 22:57:38 I want to be able to access each csv file in memory without extracting each file from the tar file

Python3 working with csv files in tar files

馋奶兔 提交于 2020-05-27 15:43:47
问题 I am trying to work with csv files contained in a tar.gz file and I am having issues passing the correct data/object through to the csv module. Say I have a tar.gz file with a number of csv files formated as follows. 1079,SAMPLE_A,GROUP,001,,2017/02/15 22:57:30 1041,SAMPLE_B,GROUP,023,,2017/02/15 22:57:26 1077,SAMPLE_C,GROUP,005,,2017/02/15 22:57:31 1079,SAMPLE_A,GROUP,128,,2017/02/15 22:57:38 I want to be able to access each csv file in memory without extracting each file from the tar file

Python3 working with csv files in tar files

无人久伴 提交于 2020-05-27 15:43:25
问题 I am trying to work with csv files contained in a tar.gz file and I am having issues passing the correct data/object through to the csv module. Say I have a tar.gz file with a number of csv files formated as follows. 1079,SAMPLE_A,GROUP,001,,2017/02/15 22:57:30 1041,SAMPLE_B,GROUP,023,,2017/02/15 22:57:26 1077,SAMPLE_C,GROUP,005,,2017/02/15 22:57:31 1079,SAMPLE_A,GROUP,128,,2017/02/15 22:57:38 I want to be able to access each csv file in memory without extracting each file from the tar file

How is codeload.github.com different to api.github.com?

雨燕双飞 提交于 2020-05-12 04:38:07
问题 I was browsing the next.js repository and noticed this function that downloads and extracts a template from GitHub, with tar: export async function downloadAndExtractExample( root: string, name: string ): Promise<void> { return await promisePipe( got.stream('https://codeload.github.com/zeit/next.js/tar.gz/canary'), tar.extract({ cwd: root, strip: 3 }, [`next.js-canary/examples/${name}`]) ) } I searched on StackOverflow and I only found this: GitHub Api download zip or tarball link That's a

Tar command in mac os x adding “hidden” files, why? [closed]

て烟熏妆下的殇ゞ 提交于 2020-05-09 17:58:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . I am writing my own tar archiver. All works fine inside my app (even reading tars generated with other tools) however I cannot get my tar files to work with 3rd party tar file readers. So I tried building a tar file on the command line, building one with my code and binary comparing the two. But there seems to

overwrite a file on tape

半腔热情 提交于 2020-04-30 06:24:48
问题 I'm trying to write a program to store large amount of data (100s of PB) on tapes. I'm using tar to group files together, but for technical reasons I've decided to write multiple tars in one tape. In order to easily find what data are on a tape, I've decided to create a small index and write it at the beginning of the tape. So I'm doing something like this: # create an empty index file head -c 1M < /dev/urandom > index.txt # rewind tape mt -f /dev/nst0 rewind # write index to the beginning of