Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there was a way to tell how many more "writes" are left on a file system device in linux? An example: when you move a lot of data to a flash drive, it may not write all data immediately. In this case, I would like to see (preferably) how much more is left to write, or even if it's a flag (such as 0 = writes complete or 1 = writes remain). Is there a particular command or file that holds that information?

share|improve this question

Might be useful the following utilities: lsof dstat. Finally, you can force pending writes to be flush to the HDD subsystem with sync CLI command.

share|improve this answer
I knew about the sync sync command, which is helpful but I want to be able to see when something needs to be "synced". Both lsof and dstat are helpful, but seem to be a little too broad (not specific enough) for what I'm looking for... – nuclearpenguin Dec 1 '11 at 15:56

You can find out how many kilobytes globally are waiting to be written, contained in "dirty" pages, however I don't know how to do this for individual devices.

grep Dirty /proc/meminfo

There are tunables in /proc/sys/vm and /sys/block/${dev_name} which can affect how rapidly dirty pages are written out; usually, they are modified by software like laptop-mode-tools.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.