2022 Developer Survey is open! Take survey.

Questions tagged [compression]

Shrinking (compressing) and restoring (decompressing) of data.

Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

CLI tool that compress the given image, whatever file type the image is (png, jpg, gif, webp, svg)?

I know that there are many tools to optimize an image: pngquant optipng jpegoptim gifsicle exiftool ecc but they are all specific for a certain file type. Is there a single command line that, ...
user avatar
  • 205
0 votes
1 answer
21 views

Create a tar.gz file from a different directory, tar must keep files in specific directory structure

Here is my file structure. I am currently residing in test2/ directory, and all commands must run from there. test/ |_test2/ publish/ |_subfolder1/ |_f1 |_f2 |_f3 |...
user avatar
  • 285
1 vote
0 answers
93 views

Alternatives to compressed tarballs

I am reading/writing data from/to tapes using Debian and recently ran into an issue where I needed to figure out the size of the stored data stream, i.e. the data actually written to the tape (see ...
user avatar
2 votes
1 answer
101 views

Read file size from tape

I have a tape with a .tar.lzma archive written to it. How can I determine the size of the .tar.lzma archived as is? In other words, I'm looking to find the size of the compressed archive, not the size ...
user avatar
0 votes
2 answers
35 views

Compress several files according to the pattern

I would like to know how to compress several files according to the pattern using gzip, tar, etc... that is, if I have these files: server_regTCA.log.2021.02.12 server_regTCA.log.2021.02.13 ...
user avatar
0 votes
2 answers
39 views

Why initrd size is not fixed?

After update-initramfs -c -k KERNELVERSION(I didn't do any change and just type this command), the initrd will always has different size with the previous initrd. And this situation happen on Debian ...
user avatar
  • 21
1 vote
1 answer
50 views

How to compress stdout without block buffering

I tryed this myprogram | gzip > /var/log/mylog.log In my understanding this will write to log file only when a whole gzip block is produced, which I think is 32kB. This introduces considerable lag ...
user avatar
  • 123
18 votes
2 answers
2k views

How do I uncompress a file with lots of zeroes as a sparse file?

I have a compressed raw image of a very large hard drive created using cat /dev/sdx | xz > image.xz. However, the free space in the drive was zeroed before this operation, and the image consists ...
user avatar
-1 votes
1 answer
94 views

Pick random line from a compressed text file with zcat/gz or altnernatives

I have a simple bash script that picks a random line from a text file. This is originally done with shuf file.txt | head -1 (the same result can be achieved with cat file.txt | shuf | head -1). I also ...
user avatar
3 votes
1 answer
66 views

Reduce the filesize of a PDF with text?

I have a PDF created with PDF Sandwich. Each page of the PDF contains a background image and some foreground text. I want to reduce the filesize (not the resolution) of the background image - and ...
user avatar
4 votes
2 answers
516 views

Unable to choose compress program

I can't choose the compress program while using tar v1.26. While this works tar -c -I 'xz' -f foo.tar.xz * This won't work: tar -c -I 'xz -T0' -f foo.tar.xz * tar (child): xz -T0: Cannot exec: No ...
user avatar
0 votes
2 answers
22 views

Archive folder onto server, compress on the host

I try to do the following: Upload a folder (say Pictures) onto a server Let the server compress the input stream and save it to a file Importantly, step 1) should be uncompressed as the connection ...
user avatar
0 votes
0 answers
30 views

tar compress only if source files updated

I am implementing a process in which a tar.gz file is created that compresses various files needed from the process. When this compression is done I don't want it to be compressed again, or crush the ...
user avatar
  • 101
0 votes
0 answers
67 views

How to make mksquashfs with parameters

I have read Squashfs filesystem , when I look on this file with binwalk or with file I saw: Squashfs filesystem, little endian, version 4.0, compression:xz, size: 1233455 bytes, 112 inodes, blocksize:...
user avatar
2 votes
0 answers
123 views

Compare zip file and extracted directory

What is the simplest way to compare a zip file and a directory that has been extracted from the zip file? I would like to delete the zip file if they are the same. Example. Need to check if Archive....
user avatar
  • 121
2 votes
3 answers
363 views

tar list full filename without directory

I have a tgz file with the following file structure - folder - subdir1 - file1.txt - file2.text - subdir2 - file1.txt When i run tar -tf folder.tgz, it outputs the following:...
user avatar
0 votes
1 answer
62 views

Exclude directory from tar

I try to compress my wordpress directory /srv/www/vhost/wp-intranet. But I need to exclude the directory /srv/www/vhost/wp-intranet/wp-content/uploads/ First I changed directory to /srv/www/vhost/ ...
user avatar
  • 1,708
0 votes
0 answers
21 views

Is modifying a database on compressed ZFS slow?

Is modifying (mainly inserting new rows into tables with many indexes) a (PostgreSQL) database on a compressed ZFS slow (compared to an uncompressed ZFS)? I used a slow HDD backed by SSDs. Ubuntu ...
user avatar
  • 2,036
0 votes
2 answers
39 views

Tool to detect and give info of compression method

What is utility tool to detect and give info of compression method (preferably more info) in any mean (CL or GUI) ? IOW what windows 7z tool equivalent for Linux, giving info easily in GUI?
user avatar
0 votes
1 answer
52 views

Create set of fixed sized compressed files from a large number of files

I have set of large number of files to be archived in a linux server. I need to compress those files in to set of 1GB compressed files. I am using gzip to compress the files but I don't know the final ...
user avatar
  • 101
1 vote
1 answer
203 views

7z command to create a XZ file

The man page says 7z tool supports 7z, LZMA2, XZ, ZIP, Zip64, CAB, RAR, ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem images and DEB formats. And it says we could pass the type as -t{Type}. ...
user avatar
1 vote
1 answer
310 views

Does Ubuntu support working with compressed Windows files?

In Windows 10 pro, there is an option "Compress this drive to save disk space". If I were to enable that option, will Ubuntu be able to open the files like normal? And is there any side ...
user avatar
2 votes
1 answer
767 views

How to increase the compression level of SSH tunnels

This is how I establish an SSH tunnel (dynamic port forwarding using SOCKS) from a local computer to a remote computer: ssh -C -N -D 12345 user@192.168.1.2 I use compression (-C) because my bandwidth ...
user avatar
  • 1,832
1 vote
1 answer
852 views

How to tell if btrfs subvolumes are actually compressed or not

I have mounted Btrfs subvolumes (including /home) with the compress=no option in /etc/fstab. However, when I run btrfs inspect-internal dump-super -a <device_name> (both, on the running system, ...
user avatar
0 votes
1 answer
110 views

Mounting zip files (plural)

I know I can mount a single zip file as a directory for read-only access (Mount zip file as a read-only filesystem) but if I have a directory (or a directory tree) containing many zip files, is there ...
user avatar
  • 585
6 votes
1 answer
360 views

How does the ent program calculate "optimum compression"?

The ent program can be run on a file to give output such as the following: Entropy = 4.731183 bits per byte. Optimum compression would reduce the size of this 15731 byte file by 40 percent. Chi ...
user avatar
  • 1,335
0 votes
1 answer
463 views

can't uncompress a gzip compressed data

I have extracted a file 'linux' from ubutu installation .iso file. The command file linux gives me this output. linux: gzip compressed data, was "vmlinuz-5.4.0-42-generic.efi.signed", last ...
user avatar
  • 269
3 votes
1 answer
157 views

How can I enable transparent compression on exisitng f2fs partition?

As far as I know it is possible to enable on new partition. Is there any way to enable compression on existing f2fs partition? I don't want to wipe and create a new partition to enable this feature.
user avatar
0 votes
1 answer
94 views

Extract .tar.gz inside a .tar file

I have a double-compressed file (.tar.gz inside a .tar) and i would like to know if there is any way to automatically extract it from a bash script. I tried two approaches: tar -xf $1 #the first .tar ...
user avatar
3 votes
1 answer
533 views

Does mounting squashfs put the whole filesystem in RAM?

Situation: I've got a larger (>10GB) read-only collection of small files with loads of duplicates that I need to have available on multiple machines, even on different file systems. We can assume ...
user avatar
0 votes
1 answer
51 views

What are the file specifications of a compress .Z file?

For some reason, I am unable to find what the specifications are for a .Z file even though I see many things supporting it. Why is it so hard to find online? I am very familiar with LZW compression ...
user avatar
1 vote
2 answers
79 views

Uncompressed files by content double gzipped by mistake

I have some files that I gzipped twice by mistake with no file extension For example gzip -dc file outputs some binary gibberish for some of the files and for some other files it's okay I would like ...
user avatar
  • 111
3 votes
2 answers
4k views

How can I extract a RAR file on Debian?

I've got a 20GB RAR file to extract with a password on Debian Linux Google Cloud VM. I first tried sudo apt-get install unrar but the following output was given: Reading package lists... Done Building ...
user avatar
0 votes
1 answer
107 views

Tool/library to compress/decompress on the fly

I am looking for library or linux command line tool that allows to compress and decompress on the fly. By 'on the fly' I mean something that will work with following sh script: > while:; do; echo &...
user avatar
  • 103
3 votes
0 answers
444 views

How to prevent btrfs compressing /var

I just installed new instance of Fedora 33 and enabled compression for my root volume via compress=zstd:3 mount option. I enabled compression of /usr with chattr +x /usr. I would like to disable ...
user avatar
  • 1,862
0 votes
1 answer
74 views

How to compress every file in a directory into its own compressed file (files not in current directory)

If the location DATA/AAA/INPUT contains n files (the file names are random job names), I need to create tar files for all the n files in the DATA/AAA/OUTPUT location with a common name format. So, if ...
user avatar
0 votes
1 answer
69 views

What is the fastest / best compression for large dar archives

I'm using dar (like tar, but optimized for hard disks) for backing up RAID volumes. They're modest sized for RAIDs, at perhaps 3 - 10 TB. I'm aiming to put the results on 8 TB external drives, but ...
user avatar
  • 115
2 votes
1 answer
432 views

How can you compress images in a PDF?

How can you increase the JPEG compression level on a PDF using batch tools under Linux? Obviously you can use gs -dPDFSETTINGS=/screen or /ebook, but that downsamples the PDF - it reduces the DPI. It'...
user avatar
  • 2,262
0 votes
1 answer
164 views

compress: No compression -- file unchanged

I was trying to compress an image on Linux, specifically using the compress command, and it wasn't working. Can you please advise, based on the output below, what I'm doing wrong and how I could fix ...
user avatar
7 votes
0 answers
386 views

Make Btrfs use all CPUs for compression

I have been playing around with Btrfs and compression, but I have been unable to make Btrfs use all my CPU cores for compressing. The kernel compression processes max out at 8 cores (all running >...
user avatar
  • 29.6k
4 votes
1 answer
338 views

Maximal compression possible with Btrfs

I have been playing around with Btrfs. The maximal compression I have been able to achieve is 30:1 and that is on a file like: yes foo | head -c 10G > file Command line zstd will compress the file ...
user avatar
  • 29.6k
3 votes
2 answers
870 views

got "tar: /path/to/my/dir: Not found in archive" error while verifying created archive

I did compress a directory to .tar.xz archive format with this command: tar --create --verbose --file myArchive.tar.xz /path/to/my/dir then,I tried to check health of created archive with following ...
user avatar
  • 79
0 votes
1 answer
583 views

How to unzip the U-boot image?

I have the U-boot image called: rootfs.13cy.initramfs.bzip2.uboot I want to see what's inside of it. Whats dumpimage cmd shows me: dumpimage -l rootfs.13cy.initramfs.bzip2.uboot Image Name: ...
user avatar
0 votes
1 answer
762 views

"xz : (stdout) : Write error: File too large" while writing a tar archive

I wanted to compress a directory whit size of about 25 GB to .tar.xz format using following command: tar --xz --create --verbose --file myArchive.tar.xz /patch/to/my/dir but got these error lines: xz:...
user avatar
  • 79
0 votes
1 answer
181 views

how to fix "tar: Cannot verify compressed archives" error?

I wanted to compress a directory into .tar.xz format and verify it after writing so I wrote a command like this: tar --xz --create --verbose --verify --file myArchive.tar.xz /patch/to/my/dir but it ...
user avatar
  • 79
1 vote
1 answer
383 views

Updating a large compressed file without creating temp file

I'm trying to figure out a way that I can update a compressed file (currently using zip, but am open to tar/gz/bz derivatives too) on a linux server without creating a temp file for the file to be ...
user avatar
1 vote
1 answer
232 views

Lossless ffmpeg recordings with low resource usage

I'm trying to record lossless videos with ffmpeg of My screen My computer audio My microphone audio using this script: MIC="alsa_input.usb-Logitech_Logitech_USB_Headset-00.mono-fallback" ...
user avatar
  • 173
1 vote
0 answers
213 views

The size of my lzma compressed file is different from one system to another using same compression ratio - why?

I have an lzma compressed file that I've extracted from a firmware image (via binwalk) that is X bytes uncompressed and Y bytes compressed. When I try to compress the extracted file again - without ...
user avatar
13 votes
3 answers
14k views

How to use multi-threading for creating and extracting tar.xz

I use tar -cJvf resultfile.tar.xz files_to_compress to create tar.xz and tar -xzvf resultfile.tar.xz to extract the archive in current directory. How to use multi threading in both cases? I don't ...
user avatar
  • 237
2 votes
1 answer
445 views

How do you determine the remaning capacity of a magnetic tape with mt or tar? How much space is in a block?

I am currently trying to back up data onto an LTO-4 tape using mt-st and gnu tar 1.32, but I want to make sure I stop trying to copy things before the tape runs out! LTO-4 nominally has a capacity of ...
user avatar

1
2 3 4 5
8