![]() If you’re not cautious, you might delete essential files that would break your project. Remember that you shouldn’t necessarily delete files just because they are large. The combination should look like this: du -h /home/user/Desktop | sort -rn The script will sort all the files and folders from largest to smallest to check the disk space use in Linux. Then, we pipe the result to the sort command together with the -rn option. Sorting Files By Sizeįirst, we gather files and folders on the Desktop in a readable format using the du command. After that, you can proceed with these combinations. Just remember to start with df command to see which file system needs a cleanup the most. By doing this, you will get a better idea of which files you can delete to free up disk space. You can get more information done by combining df and du command with other arguments. df –help - it displays a list of available options and what they can be used for.Ĭombining Commands and Cleaning Disk Space.du -h - time /home/user/Desktop - this informs the last modification date of the displayed folders and files.du -m /home/user/Desktop - the -m option provides us with folder and file sizes in Megabytes (we can use -k to see the information in Kilobytes). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |