David Hedges

  • Home
  • About
  • Contact
  • Business Blog
  • IT Blog

Clearing open files on NSS volumes in OES Linux

July 24, 2011 by dhedges Leave a Comment

No matter how you do this it’s a pain if you have a lot of users. You would think you could run ncpcon and grep for the file or user, but you can’t. If you choose to do this from the command line, this is how I think the easiest way.

start with a ssh terminal app like putty, and set your buffer to something much higher than the default ( I usually choos 2000).

after you connect to the server, run the following:
ncpcon files list v=volume

this will list all of the open files, from here I copy the entire list and paste it into a file. At this point you can grep for the file name and find the and verify the file is open, and get its full path. Copy the full path to the file, or if it’s easier, the connection number

at this point to close the connection run:
ncpcon files close f= (if there are spaces, you will need to escape the spaces in the name (ex. /media/nss/vol/program\ files/file.txt )

or if you are just killing all of the users open files:
ncpcon files close c=

all of this can also be done using Remote manager too: http://<server IP>:8008 >Manage NCP Services>Manage Connections

Filed Under: IT Blog

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2025 · Beautiful Pro Theme on Genesis Framework · WordPress · Log in