ulimit

Hello, could you help me please?
I write in command line: "ulimit 500"
-> i've set the max size of 512-bytes blocks that i can write in one file.
But when after it i use ulimit.3c in my program: "ulimit(UL_GETFSIZE);"
the result turns out 1000. Why is it so? They always differ so that one is half as much as another and corresponding to man they must be equal i think.

I guess you aren't using sh or ksh but bash which, like other Gnu tools, doesn't necessarily stick to established standards. In particular, it uses 1024 bytes "increments" instead of the usual/traditional 512 bytes blocks.

1 Like

Ok, i understand, thank you. )