You are not logged in.

#1 2020-11-18 18:43:22

marknikky
Member
Registered: 2019-11-05
Posts: 10

[SOLVED] After reading/writing from/to USB Storage, do I need to sync

Hello,

For example, after I move a file to USB from my PC. Unmounting takes a lot time, if I don't do

# sync

But if I do that sync does take a lot time, unmount doesn't take time.

So my question is as the title states, do I need to sync everytime?

Last edited by marknikky (2020-11-20 13:47:13)

Offline

#2 2020-11-18 18:45:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] After reading/writing from/to USB Storage, do I need to sync

A sync needs to happen, or you will lose unwritten data.  As you've already noted, the umount command will sync prior to unmounting, so there is no need for an actual sync command - but it can be useful to flush everything to the disk if you are not sure whether you will be writing more to the USB or not and plan to have it plugged in for a while - that way when you chose to unmount it, the writing is already done.

Last edited by Trilby (2020-11-18 18:47:37)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2020-11-20 13:46:13

marknikky
Member
Registered: 2019-11-05
Posts: 10

Re: [SOLVED] After reading/writing from/to USB Storage, do I need to sync

Thank you for your answer.

Offline

Board footer

Powered by FluxBB