The | in such context always means use "either|or|else".
So use either:
VBoxManage modifyhd "/Users/user/VirtualBox VMs/Ubuntu/Ubuntu.vdi" --resize 20000
You have to use the absolute path to the file or the relative path starting from the current directory.
VBoxManage modifyhd <UUID> --resize 20000
The UUID of the medium has to be registered. Registered images can be listed by
VBoxManage list hdds (see Section 8.4 of the VirtualBox manual, “VBoxManage list”)
Resizing does not work if the guest has snapshots (prior to version 4.3.*) nor will it work on 'fixed' drives. When doing anything that could prove as destructive as this should you make a mistake, backup the *.vdi file before you start.
After resizing the disk you have to extend the contained partition!
Download the Gparted live cd or what ever partition manager program you wish and mount it to the guests virtual CD and boot the guest.
From here you can expand the primary partition to use the new space.
You can download the Gparted Live CD from here.
If you have issues where Gparted fails, try with Parted Magic here.
Parted Magic is no longer free to download (at least from the source).