함수 disk_total_space()

1 개요[ | ]

함수 disk_total_space()

2 Bash[ | ]

df --block-size=1 --output=size / | 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.Blocks * uint64(stat.Bsize))
}

4 PHP[ | ]

<?php
echo disk_total_space("/");

5 같이 보기[ | ]

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