함수 disk_available_space()

1 개요[ | ]

함수 disk_free_space()
함수 disk_avail_space()
함수 disk_available_space()

2 Bash[ | ]

df --block-size=1 --output=avail / | sed 1d

3 Go[ | ]

package main

import (
	"fmt"
	"os"

	"golang.org/x/sys/unix"
)

func main() {
	var stat unix.Statfs_t
	wd, _ := os.Getwd()
	unix.Statfs(wd, &stat)
	fmt.Println(stat.Bavail * uint64(stat.Bsize))
}

4 PHP[ | ]

<?php
echo disk_free_space("/");

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}