I have come to figure out that qemu-img will only create sparse qcow2 images. I even tried creating a raw file then converting but as soon as I convert it also converts to a sparse file. I don't get why during the original install using virt-install doesn't do this.
I am trying to add a disk image to a windows 2008 server guest.
Don't worry, this isn't typical "du vs. df" question. :-)
I mounted a squashfs image (via loop) and used du to reported the size: du --apparent-size -lsh image1/ which reported 215M. Then I used rsync ("rsync -aS") to copy all files to a real partition (ext4). To my surprise du reports for this directory now: 302M. Where do the additional 87MB come from?
I seem to have corrupted my qcow2 image. I accidentally ran qemu-img create on one of my virtual machines while running.
From the man page of logrotate:
minsize size
Log files are rotated when they grow bigger than size bytes, but not before the additionally specified time interval (daily, weekly,
monthly, or yearly).
Given the size of a file in bytes, I want to format it in kibibytes, mebibytes etc. to 3 significant figures with trailing zeros, e.g. 1883954 becomes 1.80M. Floating-point arithmetic isn't supported in bash, so I used awk instead. The problem is I don't how to keep the trailing zeros.
Hi! I started my Linux adventure just few weeks ago. Here's my biggest problem yet... :wall:
How to get total size in bytes of all files inside directory?
So far I've found this solution: du -bs /path_to_my_directory
But it's not good. It gives me total size in bytes of all files inside directory and its subdirectories - that's cool - but it also adds the size of the directory itself.
Hello,
I want remove files have same size in a directory.
this command only find this files.
Code:
ls -l | awk '$1!~/^d/{if(size[$5]!=""){ print}size[$5]=$8}'
I want to remove the files of the same size.
samples: 5 files are same size. I want to keep only first file.
Thank you very much for your help.
I've got KVM installed on my Slackware -current box, but am having trouble creating a disc image.
I am facing typical "size on disk" issue on windows 2008 OS.
I am using NTFS partition with cluster size of 4k and in that Size of disk is almost triple the real size. This is becaus I have large number of small files in the system.
I tries to reduce the cluster size to 2kb but in that also but that also didnt help me to reduce the "size on disk" very much.