문제

Let's say I write out some files and directories to a usb thumb drive.

/media/drive1/newFolder1/
/media/drive1/newFolder1/newfile1
/media/drive1/newFolder1/newfile2

I've created a folder, newFolder1 and two files newfile1 and newfile2.

Syncing does not happen automatically, so I'd need to fsync the changes.

So I need to call fsync on newFolder1, newfile1 and newfile2.

Question is, does it matter the order in which I do this?

도움이 되었습니까?

해결책

It won't matter for content, but last-modified-times could be wrong if the directory is not synced after the files.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top