folder content doesn't get refreshed automatically in ubuntu 14.04

The changes are not permanent, therefore

  1. Edit the file /etc/sysctl.conf

    sudo nano /etc/sysctl.conf
    
  2. Add the line below, eg

    fs.inotify.max_user_watches=1000000
    
  3. Reload the changes

    sudo sysctl -p
    

    You should see something like this

    fs.inotify.max_user_watches = 1000000
    

    and with cat /proc/sys/fs/inotify/max_user_watches

    1000000