Created
August 4, 2014 15:37
-
-
Save bperel/8ddc786c5b9bb3aacaec to your computer and use it in GitHub Desktop.
Clear VMWare disk cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: Handle caching page issues with vmware hgfs share | |
# Required-Start: $local_fs $network | |
# Required-Stop: $local_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Handle caching page issues with vmware hgfs share | |
# Description: Handle caching page issues with vmware hgfs share | |
### END INIT INFO | |
# This is brutal but it prevent page cache and handle the read/write hgfs issue width vmware tools | |
while (true); do | |
echo 1 > /proc/sys/vm/drop_caches | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment