Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a truecrypt volume, and I have some restricted data on it. I had mounted today and I started a Matlab simulation. The simulation is takes around 2-3 days, and I would like to unmount the truecrypt, but I can't because I the Matlab had opened the files and I forgot to include the close function to close those files. I don't want to stop the simulation but I would like to unmount the truecrypt.

I used lsof to figure it out who is using this volume.

MATLAB  6013  bku  276r   REG  252,0      333  158 /media/vulturus_data/wesys/Transfer/repower_temp/R4_Scada_Mai_11/sensors/sensorInfos_RePower_1.00000000.csv
MATLAB  6013  bku  278r   REG  252,0      333  158 /media/vulturus_data/wesys/Transfer/repower_temp/R4_Scada_Mai_11/sensors/sensorInfos_RePower_1.00000000.csv
MATLAB  6013  bku  279r   REG  252,0      581  159 /media/vulturus_data/wesys/Transfer/repower_temp/R4_Scada_Mai_11/sensors/sensorInfos_RePower_50.00000000.csv
MATLAB  6013  bku  281r   REG  252,0    61890   79 /media/vulturus_data/wesys/Transfer/repower_temp/R4_Scada_Mai_11/aggregated/AggregatedData_RePower_50.00000000_17.05.2011_06-30.csv

How can I close this files without stopping the Matlab Simulation.

share|improve this question
up vote 2 down vote accepted

There is an old thread on how to do this on the ubuntu forums here.

However I would definitely not recommend it. Even if matlab has finished with the data in the files it is still quite possible it would mess up your simulations. More importantly it is likely that it will cause an inconsistency within the file system and you would end up losing data. There is a reason it doesn't just unmount for you when files are in use. Forcing it to forego these security precautions usually ends up with bad results.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.