I have a .gz file and I'd like to see the content of it. I used lofiadm to mount it.

lofiadm /backup/file.gz ->>  returned /dev/lofi/1
mount -F ufs /dev/lofi/1 /mnt

Then I checked the content

/mnt> du -sh *
4K   etc
79M   kernel
8K   lost+found
13M   platform

The problem is size of file.gz was around 342 MB but the content is around 93 MB. I checked it with ls -al but there were no other file.

/dev/lofi/1            321M    93M   196M    33%    /mnt

Now I don't understand how that happens. File size was 342 MB but after mount it returns 92 MB


I'm not familiar with lofiadm, so I may be missing something, but I don't see anything strange. You have a filesystem with 321MB of space, of which 93MB is used and the rest is empty. The empty space may or may not be filled with easily-compressible data, so the fact that it's unused implies nothing about how well it can be compressed. The image is a little over 321MB, with extra space used for bookkeeping (inode tables).


Your file.gz file doesn't seem to be compressed at all given the fact you are mounting it as is, i.e. without decompressing it:

lofiadm /backup/file.gz ->>  returned /dev/lofi/1

The file system reported size is 321MB which is consistent with a 342 MB "device", as Gilles already answered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.