"unliked" when using "sin files"

Hi all,

When using the command “sin files”, I see a line as :
/ /1/bin/ksh 7 10 ----W- 32350k/32350k / /1/ …unliked


Does anybody know what this can come from and how to free this space?

Thank you for your help
Michele

MicheleD <michele-d@ibelgique.com> wrote:

Hi all,

When using the command “sin files”, I see a line as :
/ /1/bin/ksh 7 10 ----W- 32350k/32350k / /1/ …unliked



Does anybody know what this can come from and how to free this space?

It occurs when a file is open, but unlinked:

fd = open (“spud.dat”, O_RDWR);
unlink (“spud.dat”);

The idea behind code like this is that it allows a file that will eventually
“automagically” evaporate when the “close (fd)” call is issued – since it’s
already unlinked, its link count indicates it can be erased when no-one is
using it.

The only way you can reclaim the space is to kill “ksh” :slight_smile:

(In the ksh case, it could have happened as “ksh >/file & ; rm /file”)

Cheers,
-RK

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Ok, I killed the process, the “unlink” disappear. However, the memory space
has not been freed!! (even after the software reboot of the machine)

How can I free this space now? Is there anything like a “scandisk” for qnx?

Thank you
Michele



Robert Krten <nospam84@parse.com> a écrit dans le message :
b18kma$2i8$1@inn.qnx.com

MicheleD <> michele-d@ibelgique.com> > wrote:
Hi all,

When using the command “sin files”, I see a line as :
/ /1/bin/ksh 7 10 ----W- 32350k/32350k / /1/
…unliked


Does anybody know what this can come from and how to free this space?

It occurs when a file is open, but unlinked:

fd = open (“spud.dat”, O_RDWR);
unlink (“spud.dat”);

The idea behind code like this is that it allows a file that will
eventually
“automagically” evaporate when the “close (fd)” call is issued – since
it’s
already unlinked, its link count indicates it can be erased when no-one is
using it.

The only way you can reclaim the space is to kill “ksh” > :slight_smile:

(In the ksh case, it could have happened as “ksh >/file & ; rm /file”)

Cheers,
-RK

Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.

MicheleD <michele-d@ibelgique.com> wrote:

Ok, I killed the process, the “unlink” disappear. However, the memory space
has not been freed!! (even after the software reboot of the machine)

How can I free this space now? Is there anything like a “scandisk” for qnx?

Thank you
Michele

Look at ‘chkfsys’ if it’s on a QNX file system.
Note: no other files should be (at least) be growing/shrinking being
allocated/deleted while chkfsys is running.


Bill Caroselli – Q-TPS Consulting
1-(626) 824-7983
qtps@earthlink.net