How to identify the largest files in a directory including in its subdirectories?
I like spotlight better than crawling the filesystem for speed reasons. This doesn't directly report sizes so you can sort top 10, but you can quickly (fraction of a second) locate places where large files exist.
mdfind 'kMDItemFSSize &gt; 2000000000' | grep &quot;$(pwd)&quot;

More options are on this thread. Add or remove zeroes or pick your size threshold for finding large files.

As to your syntax errors and other problems you'll face is handling spaces in files and directories, hence the &quot; &quot; around $(pwd) so you can quickly get in territory where you need to learn a bit more about shells, pipes, white space and escaping words / variables. Worst case, isolate each one element above so you can learn what the output of the find command is telling you and they layer back the filters / processing once you have valid results.
If all you are after cleaning large files and you don't need a script and want to learn that later. I recommend system information, storage management or Daisy Disk. Finder also can calculate all sizes well for me in preferences if you want to interact as you navigate.