Find the answer to your Linux question:
Results 1 to 2 of 2
Hello everyone I'm trying to create a simple bash script that force syncs one single file to disk. So far, I've used the "sync" command but this flushes ALL file ...
  1. #1
    thb
    thb is offline
    Just Joined!
    Join Date
    Mar 2010
    Posts
    2

    [SOLVED] Syncing only one file to disk

    Hello everyone

    I'm trying to create a simple bash script that force syncs one single file to disk. So far, I've used the "sync" command but this flushes ALL file cashes. Since I'd like to run this script like every 5 seconds, "sync" is not the right tool.
    From some site I got this piece of code:
    Code:
    #!/bin/bash
    while true
    do
        date > /tmp/.poke
        fsync /tmp/.poke
        sleep 5
    done
    However, my system (Kubuntu 9.10) does not seem to have the "fsync" command. So is there a bash command or other way to sync only one specific file?

    To anyone who wonders what this is about, the answer is WD's glorious IntelliPark

  2. #2
    thb
    thb is offline
    Just Joined!
    Join Date
    Mar 2010
    Posts
    2
    Ok, nevermind. Despite reports that say otherwise, WDIDLE3.EXE actually works and my box is silent again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...