9/2/2023 0 Comments Find file size linux terminalUsing the command with the filename parameter will enable you to get your file size info. This command will help you get system-related info, file permissions, size, group, owner, and the last modification time. To do that I'm using: find / -maxdepth 10 -size +100000 -ls I tried changing -ls to -lsh but it is not allowed. 1 Using the stat command You can use this command to get the file size in Linux OS. 2.4M, 24G).įind path/to/your/directory -type f -exec du -h + | sort -hr | head -20Īgain, you use the | symbol to take the output of the last command (sorted files + size) and use that as an input to the head command, which prints the top 20 files here. 3 Answers Sorted by: 10 find -iname '.zip' -size + ( (6010241024))c -size - ( (7010241024))c Do NOT use the abbreviations 60M and 70M as this will also exclude all files of size greater than 69MB including 69. How to display human-readable file sizes in find results Ask Question Asked 9 years, 3 months ago Modified 9 years, 3 months ago Viewed 56k times 20 I'm trying to find all large files on my Centos server. Login as root user using the sudo -i command. find command to search files matching a pattern. The procedure to find largest files including directories in Linux is as follows: Open the terminal application. Here is the command to find the top 20 largest files in a given directory and print their size in a human readable format (eg. You can do so with the find command using the regex pattern (. If you want to find the largest folders within your Linux system, see this post instead.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |