How to find the lasrgest file in a directory recursively using du command


How to find largest file in directory

sudo du -a / 2>/dev/null | sort -n -r | head -n 10 if(typeof __ez_fad_position != 'undefined'){__ez_fad_position('div-gpt-ad-tutorials_technology-medrectangle-3-0')}; In the command avobe we use pipes to sort the results, and then we keep with the top 10 biggest files. 2>/dev/null is to redirect stderr to the /dev/null, aka to avoid printing permission denied errors.