Tagged Questions
1
vote
2answers
51 views
Chaining mysqldumps commands to output a single gzipped file
Let's say I have these series of commands
mysqldump --opt --databases $dbname1 --host=$dbhost1 --user=$dbuser1 --password=$dbpass1
mysqldump --opt --databases $dbname2 --host=$dbhost1 --user=$dbuser1 ...
11
votes
2answers
3k views
How tell gzip to keep original file?
I would like to compress a text file using gzip command line tool while keeping the original file. By default running the following command
gzip file.txt
results in modifying this file and renaming ...
2
votes
1answer
421 views
Recursively Gziping Files (and keep original files) & Gziping Text Input
I need Gzip to pre-zip some static files for a webserver I'm building. All of the files I need to gzip will be in a folder named .cache. Since some clients may not accept responses that are gzipped, I ...
4
votes
4answers
850 views
How can I check if a gzipped file is empty?
Is there a quick way to check if a gzipped file is empty, or do I have to unzip it first?
example:
$ touch foo
$ if [ -s foo ]; then echo not empty; fi
$ gzip foo
$ if [ -s foo.gz ]; then echo not ...
