title: Bash scripting wanting to find a size of a directory and if size is greater than x then do a task
body: <p>I have put the following together with a couple of other articles but it does not seem to be working. What I am trying to do eventually do is for it to check the directory size and then if the directory has new content above a certain total size it will then let me know.</p>
  
  <pre><code>#!/bin/bash
  file=private/videos/tv
  minimumsize=2
  actualsize=$(du -m "$file" | cut -f 1)
  if [ $actualsize -ge $minimumsize ]; then
          echo "nothing here to see"
  else
          echo "time to sync"
  fi 
  
  this is the output:
  ./sync.sh: line 5: [: too many arguments
  time to sync
  </code></pre>
  
  <p>I am new to bash scripting so thank you in advance.</p>