How do I find the largest files in Linux?

How do I find the largest files in Linux?

How do I find the 10 largest large files in Linux?

Command to find 10 largest files in Linux

  1. du command -h option : display file sizes in human-readable format in kilobytes, megabytes, and gigabytes.
  2. du command -s option : display total for each argument.
  3. du command -x option : skip directories. …
  4. Sort command -r option: Reverse the result of comparisons.

How do I find my largest files?

How to find your largest files.

  1. Open File Explorer (aka Windows Explorer).
  2. Select “This PC” in the left pane so that you can search your entire computer. …
  3. Type “Size: ” in the search box and select Gigantic.
  4. Select “Details” on the “View” tab.
  5. Click the Size column to sort from largest to smallest.

How can I determine which folders are taking up the most disk space?

Go to the System settings group, and select the Storage tab. This will show you all drives connected to your system, both internal and external. For each drive you can see used and free space. This is nothing new and the same information is available by visiting This PC in File Explorer.

How to find the 10 largest files in UNIX?

Steps to find the largest directories in Linux

du command : Estimate the space occupancy of the file. sort command: Sort lines of text files or given input data. head command: output the first part of the files, ie display the first 10 largest files. find command : Search file.

How do I use find on Linux?

Basic examples

  1. Find . – name this file.txt. If you need to know how to create a file named thisfile. …
  2. find /home -name *.jpg. Look for all. jpg files in /home and directories below.
  3. Find . – Type f -blank. Look for an empty file in the current directory.
  4. find /home -user randomperson-mtime 6 -iname “.db”

How to list only directories in Linux?

How to list directories on Linux only? Use of Linux or UNIX-like systems the ls command to list files and directories. However, ls has no option to only list directories. You can use a combination of the ls command, the find command, and the grep command to list directory names only.

How do I find search tools in File Explorer?

To search for files in File Explorer, open File Explorer and use the search box to the right of the address bar. Tap or click to open File Explorer. The search searches in all folders and subfolders within the library or the displayed folder. When you tap or click in the search box, the Search Tools tab appears.

How do I find large files on Windows?

Searching for large files in Windows

  1. To ensure all files are visible, first unhide hidden folders. …
  2. Open Windows Explorer by clicking on the folder icon in your taskbar.
  3. Locate the search bar at the top right. …
  4. Click the Size dropdown menu and select the file size range you want to search for.

How do I find large files in Google Drive?

If you have @gmail google account, Go to and click the Verify link under Large Files.. You get a sorted list view of all files in your Google Drive, sorted by size. Select the ones you no longer need and click the “Delete” button to free up space immediately.

What does the du command do on Linux?

The du command is a standard Linux/Unix command that allows a user to quickly get disk usage information. It is best applied to specific directories and allows for many variations to customize the output to suit your needs.

Which directory takes up more space on Ubuntu?

Check which folders are taking up the most disk space on Linux

  1. Command. moron 2>/dev/null | grep ‘[0-9. ]+G’ …
  2. explanation. moron. Displays the directory and respective sizes in a human-readable format. …
  3. That’s it. Keep this command in your favorite command lists, it will be needed at really random times.

How to list first 10 files in Linux?

the ls command even has options for it. To list files in as few lines as possible, you can use –format=comma to separate filenames with commas like in this command: $ ls –format=comma 1, 10, 11, 12, 124, 13, 14, 15, 16pgs -Landscape.

How to show top 5 records in Unix?

Enter the following head command to display the first 10 lines of a file named bar.txt:

  1. Head -10 bar.txt.
  2. Head -20 bar.txt.
  3. sed -n 1,10p /etc/group.
  4. sed -n 1,20p /etc/group.
  5. awk ‘FNR <= 10' /etc/passwd.
  6. awk ‘FNR <= 20' /etc/passwd.
  7. perl -ne’1..10 and print’ /etc/passwd.
  8. perl -ne’1..20 and print’ /etc/passwd.

What is the difference between df and du?

df against you. … The (very complicated) The answer is best summarized as follows: The df command returns a flat number of how much total space is being used on your filesystem. The du command is a much more accurate snapshot of a specific directory or subdirectory.


Let me know in the comments what you think about this blog post. about How do I find the largest files in Linux?. Did you find it helpful? Do you have any doubts? I’d love to hear your thoughts!

#find #largest #files #Linux

Leave a Comment