Quick Answer: How to Find Large Files in Linux?
Contents Linux Find Largest File in Directory Recursively Using Find Open the Terminal Application. Login as Root User Using the Sudo -I Command. Type Du -a...
Contents
Linux find largest file in directory recursively using find
- Open the terminal application.
- Login as root user using the sudo -i command.
- Type du -a /dir/ | sort -n -r. | head -n 20.
- du will estimate file space usage.
- sort will sort out the output of du command.
- head will only show top 20 largest file in /dir/
How can I tell which files are taking up space Linux?
Find Largest Directories in Linux
- du command: Estimate file space usage.
- a : Displays all files and folders.
- sort command : Sort lines of text files.
- -n : Compare according to string numerical value.
- -r : Reverse the result of comparisons.
- head : Output the first part of files.
- -n : Print the first ‘n’ lines.
Must Read
How do I find the top 10 largest files in Linux?
How to find out top 10 files and directories on Linux or Unix
- du command : Estimate file space usage.
- sort command : Sort lines of text files or given input data.
- head command : Output the first part of files i.e. to display first 10 largest file.
- find command : Search file.