Skip to main content

All Questions

Tagged with
0 votes
1 answer
440 views

Perform operations on the output of find command with -exec options

I want to perform operations on the files found by the find command which already has a -exec option. find . -type f -exec zgrep -li "4168781103" {} + Output: ./results/...
Prithvi Jayaraman's user avatar
2 votes
1 answer
143 views

How to Tar/GZip just the files folders in the data directory?

I have a bunch of folders and files in /usr/local/bin/data that I want to tar.gz. I have a bash script that sets the source folder to backup src='/usr/local/bin/data/* When I open up the .tar.gz ...
user1052448's user avatar
0 votes
0 answers
647 views

GZIP corruption with big files?

I came across a weird behavior: gzip v1.5 - Fedora r18 A file -rwxrwxrwx. 1 root root 3892576256 Apr 28 11:29 vm.qcow2 Initial checksum: md5sum vm.qow2 954c5461468d68daed3cef6a7b66bd8f vm.qcow2 ...
CyrilP's user avatar
  • 1
1 vote
1 answer
652 views

Need help in the shell script - gunzip and file command

This is on Ubuntu 12.04. I have a custom webkit based application where "browser" saves bunch of cache files. When triaging the problems, I have to inspect the cache. The cache directory holds many ...
user871199's user avatar
0 votes
2 answers
871 views

Concatenate header of one file with tail of another

I have a large gzipped mysqldump file which contains some table definitions and then many insert statements. I'd like to edit the table definitions but leave the insert statements alone. The file is ...
noisecapella's user avatar
0 votes
2 answers
1k views

What is the difference in various commands for compressing files in linux?

What are the commands for compressing files in linux and what are the difference between them? (for example: tar, gzip, rar). I'm working on Linux Mint 11 and doing a script for compressing files. I ...
Nojas's user avatar
  • 25
5 votes
2 answers
10k views

gzip many files one by one

I have 100 files, n1.txt, n2.txt,… and I want to gzip each of them, but not in one file – finally I'd like to have 100 n*.txt.gz files. How can I do that in Linux with Bash?
Dalana's user avatar
  • 59
21 votes
7 answers
158k views

Unexpected end of file. Gzip compressed file

I am going crazy with a gzip file. I can decompress the file in Windows using WinRAR but it is impossible on any UNIX operating system. the file seems to be ok. If I do file the_name_of_the_file.gz ...
cues7a's user avatar
  • 321
95 votes
6 answers
362k views

How to gzip multiple files into one gz file?

I have 100 files: cvd1.txt, cvd2.txt ... cvd100.txt How to gzip 100 files into one .gz file, so that after I gunzip it, I should have cvd1.txt, cvd2.txt ... cvd100.txt separately?
Tony 's user avatar
  • 1,073
111 votes
8 answers
290k views

tar: Exiting with failure status due to previous errors

I have written a little script that tars and compresses a list of directories + files. The script appears to run succesfully, in that a useable .tar.gz file is created after the script runs. However,...
morpheous's user avatar
  • 4,393
7 votes
2 answers
8k views

Bash command to compress folder(s) with a password

How can I compress two folders into archive file (zip, gzip or something like that) with a password on the files? For example I have folder structure: rootDir dir1 dir2 dir3 dir4 I need bash ...
Perica Zivkovic's user avatar