commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magnus Grimsell (JIRA)" <j...@apache.org>
Subject [jira] Created: (IO-91) FileSystemUtils.freeSpace does not work on Sun Solaris
Date Thu, 03 Aug 2006 07:13:13 GMT
FileSystemUtils.freeSpace does not work on Sun Solaris
------------------------------------------------------

                 Key: IO-91
                 URL: http://issues.apache.org/jira/browse/IO-91
             Project: Commons IO
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 1.2
         Environment: SunOS et 5.10 Generic_118822-25 sun4u sparc SUNW,Ultra-4
SunOS alien 5.8 Generic_111433-02 sun4u sparc SUNW,Ultra-4
            Reporter: Magnus Grimsell


The method FileSystemUtils.freeSpace does not work on Sun Solaris.

    [junit] Testcase: testGetFreeSpace_String took 0.216 sec
    [junit] 	Caused an ERROR
    [junit] Command line 'df' did not return info as expected for path '/'- response on first
line was '/                  (/dev/dsk/c0t0d0s0 ):41676304 block  3133314 filer'
    [junit] java.io.IOException: Command line 'df' did not return info as expected for path
'/'- response on first line was '/                  (/dev/dsk/c0t0d0s0 ):41676304 block  3133314
filer'
    [junit] 	at org.apache.commons.io.FileSystemUtils.freeSpaceUnix(FileSystemUtils.java:315)
    [junit] 	at org.apache.commons.io.FileSystemUtils.freeSpaceOS(FileSystemUtils.java:179)
    [junit] 	at org.apache.commons.io.FileSystemUtils.freeSpace(FileSystemUtils.java:126)
    [junit] 	at org.apache.commons.io.FileSystemUtilsTestCase.testGetFreeSpace_String(FileSystemUtilsTestCase.java:90)

This is because on Solaris the df command work different if the flag -k is used or not:

$ df /
/                  (/dev/dsk/c0t1d0s0 ): 1070402 blocks   294205 files
$ df -k /
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t1d0s0    1350955  815754  481163    63%    /

I haven't found any flag that makes it output GNU format even when -k is omitted.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
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