[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f2fg73qp07ngwr":3},{"type":4,"solution":5},"solution",{"slug":6,"platform":7,"title":8,"description":9,"risk":10,"categorySlug":11,"tags":12,"verifiedAt":21,"updatedAt":21,"categoryName":22,"command":23,"undoCommand":24,"directAnswer":25,"explanation":26,"warning":24,"seoTitle":27,"seoDescription":28,"requirements":24,"macosSupport":29,"sources":30,"related":37},"find-largest-files-linux","linux","Find the largest files and folders on Linux","Rank the 20 biggest items under the current directory by disk usage.","low","files",[13,15,18],{"slug":11,"name":14},"Files",{"slug":16,"name":17},"diagnostics","Diagnostics",{"slug":19,"name":20},"terminal","Terminal","2025-11-21T00:00:00.000Z","Files & Folders","du -ahx . | sort -rh | head -20",null,"cd into the directory you want to scan and run the command below. The 20 largest files and folders are listed, largest first.","du -ahx estimates usage for every file (-a), human-readable (-h), staying on one filesystem (-x) so mounted volumes are skipped. sort -rh sorts human-readable numbers in reverse, and head -20 keeps the top of the list.","Find Largest Files on Linux — du sort head Command","Locate the biggest files and folders on Linux with du, sort and head in one pipeline.","GNU coreutils (Debian\u002FUbuntu, RHEL 等)",[31],{"url":32,"title":33,"publisher":34,"sourceType":35,"evidence":36,"retrievedAt":21},"https:\u002F\u002Fman7.org\u002Flinux\u002Fman-pages\u002Fman1\u002Fdu.1.html","du(1) — estimate file space usage","man7.org","vendor-doc","du -a lists all files; -x stays on one filesystem; combined with sort -rh shows largest first.",[38],{"slug":39,"platform":7,"title":40,"description":41,"risk":10,"categorySlug":42,"tags":43,"verifiedAt":21,"updatedAt":21},"list-open-ports-linux","List listening ports on Linux","Show all TCP\u002FUDP sockets that are listening, with the owning process.","network",[44,45],{"slug":16,"name":17},{"slug":46,"name":47},"processes","Processes"]