fsync,sync:它真的做了它应该做的? [英] fsync, sync: does it really do what its supposed to?

查看:540
本文介绍了fsync,sync:它真的做了它应该做的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Linux(2.6.31)中对sync(8)和fsync函数的功能有更多的说明。它确保文件被写入到相应的存储?

I would like to have more clarification on the functionality of sync(8) and fsync functions in Linux (2.6.31). Does it make sure the files are written to the respective storage?

推荐答案

http:/ /linux.die.net/man/8/sync

不能确保文件被写入各自的存储。它只能确保将缓存/缓存的数据刷新到磁盘设备。无论这是SD卡还是其他什么都没关系。

It does not make sure that files are written to respective storage. It only makes sure that cached/buffered data is flushed to the disk device. It doesn't matter if this is an SD Card or whatever.

这篇关于fsync,sync:它真的做了它应该做的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆