Tiny Core Base > TCB Bugs

du not taking files with same inodes into account (tcl 4.5.3)


Hi all,

I'd first like to say TCL is is AWESOME!!! But now, I'd like to report a failing.  :-[

The du utility isn't reporting space correctly.  A hard linked file should show up as not taking up so much space (only the size of the pointer to the inode).  Here is an example.

--- Code: ---$ printf "% *s" $((1024*12)) '' > file1
$ cp -l file1 file2
$ ls -li file*
  14700 -rw-r--r--    2 backup   backup       12288 Jun  5 21:18 file1
  14700 -rw-r--r--    2 backup   backup       12288 Jun  5 21:18 file2
$ du -a file*
12.0K   file1
12.0K   file2
--- End code ---

As you can see they are the same inode so I was expecting file1 to show up as 12.0K and file2 to be much less (around 1-4K) when using du.  Is there a quick fix for this? I need this to display overhead for a backup server that I'm making.

Thanks all,


P.S. Could someone fix the settings on this forum?  If I use the code tag, it says I am not allowed to post external links and keeps me from posting. :(

P.P.S. Looks like it is not enforced after the first post.

Oh, FYI, I tried it on TCL 4.5.4 with the same bug.


For now, I dled the gcc and support files and built the coreutils.  They all didn't compile, but they did compile up to compiling du so I'm happy about that.  I just need the du util anyway. :)


Please report busybox bugs to busybox. Also there would have been coreutils.tcz ;)

Duh!  Done!  ;D



[0] Message Index

Go to full version