public static int symLink ( String target , String linkname ) throws IOException { String cmd = "ln -s " + target + " " + linkname ; Process p = Runtime . getRuntime ( ) . exec ( cmd , null ) ; int returnVal = - 1 ; try { returnVal = p . waitFor ( ) ; } catch ( InterruptedException e ) { //do nothing as of yet } return returnVal ; }
Create a soft link between a src and destination only on a local disk . HDFS does not support this