How Do I Find the Top 10 Large Files in Linux?
Contents How Do I Find the Top 10 Largest Files in Linux? Linux Find Largest File in Directory Recursively Using Find Open the Terminal Application. Login as...
Contents
How do I find the top 10 largest files in Linux?
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/
17 янв. 2021 г.
How do you find which files are taking up space in Linux?
To find out where disk space is being used:
- Get to the root of your machine by running cd /
- Run sudo du -h –max-depth=1.
- Note which directories are using a lot of disk space.
- cd into one of the big directories.
- Run ls -l to see which files are using a lot of space. Delete any you don’t need.
- Repeat steps 2 to 5.