0

I wanted to move files between mountpoints in My Linux Server using a Java programme. File.RenameTo() is not working in this working as it only works for moving a file within the same mount point.Please note that Our files are very Large in size so reading and writing the data to new file in another mountpoint can be ruled out. Please help.Thanks in advance

Regards, Bala

bala
  • 11
  • 2
  • Files can't be renamed between mountpoints because the data itself need to be moved. The filesystem can't only change the filename, it need to change directly from one filesystem to another (mount point to other one). – Alexandre Lavoie Sep 11 '14 at 05:51
  • Thnaks for your repsone.So What could be the viable solution for this????...Reading and writing to another file? – bala Sep 11 '14 at 05:53
  • This is the only way, you can do it in Java or simply by using the linux command `mv`. – Alexandre Lavoie Sep 11 '14 at 05:54
  • See [this](http://stackoverflow.com/questions/106770/standard-concise-way-to-copy-a-file-in-java) for several solutions. –  Sep 11 '14 at 14:59

0 Answers0