code: public static List<File> listUnixFileSystems(String ... fstypes) throws IOException {
  		
  		List<File> drives = new ArrayList<>();
  		
  		// we may want to get only some filesystem types
  		StringBuilder command = new StringBuilder("mount");
  		if(fstypes != null && fstypes.length > 0) {
  			command.append(" -t ");
  			boolean first = true;
  			for(String fstype : fstypes) {
  				if(!first) {
  					command.append(",");
  				}
  				command.append(fstype);
  				first = false;
  			}
  		}
  		logger.trace("running command '{}'", command);
  	    Process process = Runtime.getRuntime().exec(command.toString());
  	    BufferedReader output = new BufferedReader(new InputStreamReader(process.getInputStream()));
  	    
  	    Regex regex = new Regex("^\\s*(.*)\\s+(?:on)\\s+(.*)\\s+(?:type)\\s+(.*)\\s+(?:\\(.*\\))\\s*$");
  	    
  	    String line = null;	    
  	    while((line = output.readLine()) != null) {
  	    	List<String[]> matches = regex.getAllMatches(line);
  	    	if(matches != null && !matches.isEmpty()) {
  	    		for(String [] group : matches) {
  	    			logger.trace("found file system '{}' mounted at '{}' (type '{}')", group[0], group[1], group[2]);
  	    			drives.add(new File(group[1])); 
  	    		}
  	    	}
  	    }
  	    output.close();
  	    return drives;
  	}
docs: Retrieves the list of filesystems on UNIX-like boxes, by running the "mount"
  shell command and parsing its output; all supported filesystem types are returned
  unless a list of filesystem types is provided. NOTE: no safety check is performed
  on the filesystem types: do not use user input values unless checked by you.
  
  @param fstypes
  an optional list of file system types (e.g. "ext3", "ntfs", "vfat"...); if
  provided, only filesystems of those types will be returned.
  @return
  a list of mounted file systems.
  @throws IOException