3 ms·
> > select fullpath, bytes from files order by bytes desc limit 5; > This is better. Here it is in bash: > find / -type f -exec stat -c '%s %n' {} \; | so
by gioele 11y ago
> > select fullpath, bytes from files order by bytes desc limit 5;
> This is better. Here it is in bash:
> find / -type f -exec stat -c '%s %n' {} \; | sort -nr | head -n 5
This is also a nice example of the biggest problem piped shell commands: each command is executed in isolation. Because of that you miss on many optimizations that are possible when you know the full query.