Linux is a free and open source operating system that is very similar to other operating systems, such as Windows, macOS (formerly OS X), or iOS. Linux features a graphical user interface, similar to other operating systems, and the same types of software you are used to using such as word processors, photo editors, video editors, etc. A software designer would often create a Linux version of the same program you use on other operating systems. ..
We all know that we run out of storage space eventually, but on Ubuntu 20.04, there are ways to find large files quickly. One way is to use a Raspberry Pi as a terminal emulator. Another way is to use the Terminal. The Terminal is used for all instruction actions on most Linux computers.
Steps to Find Large Files on Linux
Using the Find command to find the largest files in Linux
Find files on a Linux file system using the find command. We can use it to list files based on their file sizes and to filter results by minimum file size.
cd /usr/local/share/git Step 2: To find the biggest files inside your current working directory, type the following: git ls-files
Step 2: It is also possible add a filter with a minimum size of 100 MB.
Find “C:\Users<username>\AppData\Roaming\Microsoft\Windows\CurrentVersion” -name “My Documents” -path C:\Users<username>\AppData\Roaming Step 4: For specify a particular file add absolute path after find command. Find “C:\Users<username>\AppData\Roaming.minecraft” -name “My Documents” -path C:\Users<username>\AppData\Roaming.minecraft
To find all the files inside the “test” folder that are larger than 100 MB, do the following: ..
To search the entire file system for the largest file, use the /L command.
rm -x /dev/sda
This will remove the mounted drive and all its files.
To view the list of the largest files on your device, you must first mount your devices. To do so, open File Explorer and navigate to the location where you mounted your drives. Once you have located your drives, click on them to open their properties. In the properties window, you will see a list of all of the files that are currently mounted on your devices. You can see this list by clicking on one of the files in this list and then clicking on the magnifying glass icon to see its size in bytes.
Using the du command to find the biggest files in Linux
The du command is used to find huge files on Linux. It can be used to estimate the size of a file based on its contents.
Step 2: The -h flag will show you the help for the command. Step 3: The -c flag will create a new directory. ..
The file sizes listed here appear as very long number sequences, so they are difficult to estimate. To make it readable use the -h flag in conjunction with other flags. ..
-B block size: This sets the block size to be the same as the file’s size. -M unit: This sets the block size to be the same as the maximum memory that your computer can handle.
The sort command can be used to sort files in descending order. This is helpful when you want to find the biggest files among them. ..
- Sort the results by name
- Channel sorted list in the head command using -n 5
du -sh The five largest files in your home directory are: /home/username/Desktop/file.txt /home/username/Desktop/document.pdf /home/username/.local/.gitignore ./configure.ac ..
To find the top 10 files in your entire file system, just add the / after the du command. ..
Using the ls command to find the biggest files in Linux
The ls command can be used to list the contents of a directory, as well as to sort files by size, date, or other criteria. ..
Step 2: To sort the result by name, you can use the -n option. This will show the files in a short list format and sort them by name. ..
If you want to see the human readable form of file sizes, you can use the -lhS option. This will show the files in a long list format and sort them by human readable file size. ..
-lrhS
Final Words
If you want to free up disk space on your computer, it is important to regularly examine what files and folders are using up the most space. This can help you determine which files are unnecessary and can be removed from your hard drive. Additionally, if you are a Linux desktop user, it is recommended that you try to find large files that are not necessary for your use. However, for server users, paying for extra storage space may be necessary.