commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Soudan (JIRA)" <j...@apache.org>
Subject [jira] Created: (IO-111) FileSystemUtils.freeDiskSpaceUnix does not work if df is not in the shell path
Date Fri, 02 Feb 2007 18:44:05 GMT
FileSystemUtils.freeDiskSpaceUnix does not work if df is not in the shell path
------------------------------------------------------------------------------

                 Key: IO-111
                 URL: https://issues.apache.org/jira/browse/IO-111
             Project: Commons IO
          Issue Type: Bug
    Affects Versions: 1.3, 1.2
         Environment: Solaris
            Reporter: Xavier Soudan
            Priority: Minor


if the df command is not in the path, the method freeSpaceUnix throws an exception:

java.io.IOException: df: not found
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
        at java.lang.ProcessImpl.start(ProcessImpl.java:65)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
        at java.lang.Runtime.exec(Runtime.java:591)
        at java.lang.Runtime.exec(Runtime.java:464)
        at org.apache.commons.io.FileSystemUtils.openProcessStream(FileSystemUtils.java:357)
        at org.apache.commons.io.FileSystemUtils.freeSpaceUnix(FileSystemUtils.java:298)

Rather than expecting df is in the path, it should be searched in the following standard location:
/usr/bin/df
/usr/sbin/df
/bin/df
/sbin/df
/usr/ucb/df
/usr/xpg4/bin/df



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message