Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, I see some strange thing in my file system. I can't say it have occured or it is just file system properties because I've never notice it before. ...
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Posts
    47

    Strange thing with filesystem

    Hi all,

    I see some strange thing in my file system. I can't say it have occured or it is just file system properties because I've never notice it before.

    I make a file system by the following process which is common to us:

    (1)
    dd if=/dev/zero of=./initrd bs=1k count=5632
    mke2fs -F -m0 ./initrd

    (2)
    Mount and copy files into it:
    mount -o loop ./initrd ./root
    cp <somefiles> ./root
    umount ./root

    (3)
    Then I gzip it for some purpose
    gzip -v9 < ./initrd > ./initrd.gz

    I see that, if I just do step (2) with only mout and umount without any change on the initrd, but gzip in step (3) produce different file size each time I do the command (It happen that I don't know how to show the real size of filesystem content except using df command which display used size in percentage which doesn't show any difference when there is minor change in rootfile system content size. I think gzip is something by which I can know about the filesystem real size). The difference is about 2 bytes to 8 bytes. Could someone tell me how this happened?

    Thanks

  2. #2
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Can you post the outputs of the two commands you're running so we can see the actually values? What does "ls" show the file sizes to be?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...