banner



How To Find Biggest Files On Pc

Every bit a Linux administrator, you lot must periodically check which files and folders are consuming more than deejay space. It is very necessary to notice unnecessary junk and free up them from your hard disk.

This cursory tutorial describes how to detect the largest files and folders in the Linux file arrangement using du (disk usage) and find command. If you want to learn more about these two commands, and so head over to the following articles.

  • Learn 10 Useful 'du' (Disk Usage) Commands in Linux
  • Master the 'Find' Command with these 35 Applied Examples

How to Find Biggest Files and Directories in Linux

Run the following command to find out meridian biggest directories under /dwelling partition.

# du -a /domicile | sort -n -r | head -due north 5        
Find Largest Directories in Linux
Find Largest Directories in Linux

The above control displays the biggest 5 directories of my /home partition.

Find Largest Directories in Linux

If you want to display the biggest directories in the current working directory, run:

# du -a | sort -n -r | head -n v        
Find Biggest Directories Only
Find Biggest Directories Just

Allow united states break down the command and come across what says each parameter.

  1. du control: Estimate file space usage.
  2. a : Displays all files and folders.
  3. sort command : Sort lines of text files.
  4. -due north : Compare according to string numerical value.
  5. -r : Reverse the effect of comparisons.
  6. caput : Output the first part of files.
  7. -n : Impress the first 'northward' lines. (In our example, Nosotros displayed the first 5 lines).

Some of you would like to display the above consequence in human-readable format. i.e you might desire to display the largest files in KB, MB, or GB.

# du -hs * | sort -rh | head -five        
Find Top Directories Sizes in Linux
Detect Top Directories Sizes in Linux

The in a higher place command will show the top directories, which are eating up more deejay space. If y'all feel that some directories are non important, you can simply delete a few sub-directories or delete the entire folder to gratuitous up some infinite.

To brandish the largest folders/files including the sub-directories, run:

# du -Sh | sort -rh | head -v        
Find Largest Folder and Sub directories
Find Largest Folder and Subdirectories

Find out the meaning of each option using in in a higher place command:

  1. du command: Estimate file space usage.
  2. -h : Print sizes in human being-readable format (due east.g., 10MB).
  3. -Southward : Practise non include the size of subdirectories.
  4. -s : Display but a total for each argument.
  5. sort control : sort lines of text files.
  6. -r : Reverse the issue of comparisons.
  7. -h : Compare human readable numbers (e.thou., 2K, 1G).
  8. caput : Output the start part of files.

Find Out Meridian File Sizes Just

If you lot desire to brandish the biggest file sizes but, then run the following command:

# find -blazon f -exec du -Sh {} + | sort -rh | head -n 5        
Find Top File Sizes in Linux
Discover Top File Sizes in Linux

To notice the largest files in a particular location, just include the path beside the find command:

# find /abode/tecmint/Downloads/ -type f -exec du -Sh {} + | sort -rh | head -northward five OR # discover /domicile/tecmint/Downloads/ -type f -printf "%s %p\n" | sort -rn | head -north 5        
Find Top File Size in Specific Location
Find Top File Size in Specific Location

The in a higher place command volition brandish the largest file from /habitation/tecmint/Downloads directory.

That'due south all for now. Finding the biggest files and folders is no big deal. Even a novice administrator can easily find them. If you notice this tutorial useful, delight share information technology on your social networks and support TecMint.

If You Capeesh What Nosotros Practice Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Manufactures, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If y'all similar what you are reading, please consider buying usa a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source: https://www.tecmint.com/find-top-large-directories-and-files-sizes-in-linux/

Posted by: hillneho1973.blogspot.com

0 Response to "How To Find Biggest Files On Pc"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel