Zsh, 2828 26 bytes
for i;<<<$i>$i;ls -S|headS|sed -1q
Try it online!Try it online!
28b
Write each argument (<<<$i
) to a file also named (>$i
). List directory (ls -S
) sorted by size. Take the top result.
This is one byte shorter than aA direct port of the bash solution; is (29 bytes):
for b;(($#b>$#a))&&a=$b;<<<$a