- How to find all files with size greater than.
- 4 Answers 4
- Find files of specified size using bash in Unix [closed]
- 3 Answers 3
- Linux: Find files larger than given size (gb/mb/kb/bytes)
- Syntax of find command to find files bigger than given size in Linux
- Frequently Asked:
- Find files larger than 4gb in Linux
- Find files larger than 1gb in Linux
- Find files larger than 500mb in Linux
- Find files larger than 100mb in Linux
- Find files larger than 50mb in Linux
- Find files larger than 0 bytes in Linux
- Related posts:
- Leave a Comment Cancel Reply
- Terms of Use
- Disclaimer
How to find all files with size greater than.
Is there any GUI software that can explore a tree and find all files with size greater than some amount? Neither Nautilus nor Nemo seem to be able to do this. In my memory, I could do this with PC-Tools in DOS 3.0.
4 Answers 4
sudo apt-get install baobab baobad
There is a bunch more on this question of SuperUser, but for all ends and propose baobad is enough.
Thank you Braiam, but baobab can’t be useful as it won’t have file search/sort option. More, since Unity the menu is broken (no more edit/preferences to exclude files/folder) and I get an error analysing my own «/home/me or some of its subfolders», maybe authorizations of .ssh, and no message to direct me to a log. so. find may work better, but it is not a gui, and everytime (which is not often) it could be useful, in the urgency, I forgot the syntax, so. find is not for my humanity.
@useful there are a bunch more on the SU link, I won’t bother to bring them since. mm. it will give the impression that you want a list and you want not (nor is encouraged in SE), either way, give the link a shot, if you feel that some of them solves your problem. BTW, as you can notice I prefer CLI solutions over GUI’s since. mmm. I’m like that ;).
When I need make more free space on servers I use this command. It find all files bigger then 50 MB and «du -h» make berret list of files and «sort -n» after pipe make list numericcaly sorted by file size.
find / -type f -size +50M -exec du -h <> \; | sort -n
Oh what a nice a handy GUI. It is just too easy for a newb like me, but waiting for the same in assembly language. waiting for the machine code which is the top in elegance, I’ll stick to gnome-search-tool. -1
I know you search GUI tool, but if you will learn more with Bash then you know this in all distros and environments. For easier understanding I explain this for you. If you need I can explain this in more details, it is really easy and very useful.
Thank you zorbon.cz. Sorry for my ironic way, but I have so much other issue with command line tool that should work just as intended but doesn’t, so then I easy get irascible when some answer comes that obviously doesn’t take care of the care I asked with. Well the point is that I’m not that newb, intermediate computers user instead, so I often run in frustration with Linux. yes I know it’s the price of freedom and there is still Windows if I want to switch back. but I put the finger in the shredder. Anyway I recognize your gentle pre-comment on your command line: I didn’t see it at first
My main frustration is how could I dare advise anyone to use this OS when I can’t even help myself so often.
Sorry, maybe one of my reason to answer that is fact that I now use Windows 8.1 🙂 since Windows 8 RTM (more than 2 years) and I can not switch back to linux (and I’d like do it), because there are not alternatives to some tools) and now I donť know «nothing» about GUI. But I see CLI every day as sysadmin (I manages higher tens of servers running on CentOS or some on Debian). I understand your last mention and it is true fact.
gnome-search-tool is what I use. Very simple. It has the «Size is at least» filter where you can specify minimum file size. See screen print for searching my ISOs folder with a minimum size of 10,000,000 KB in size.
Thank you rik.shaw, I completly forgot this since I use unity, and as I thought gnome-search-tool was a feature/companion of Nautilus (what I now know is false) growing . more and more spartan, so I switched to Nemo (which, btw, doesn’t help more in that matter of searching), so I was stuck. I will give a try back to it although I remember issues in gnome-search-tool keeping searching for hours when it met unauthorized directories or files or looping through links. Anyway, even if there isn’t a better tool, at least it was the kind of answer I expected. Thank you again.
Find files of specified size using bash in Unix [closed]
That command gives me find: unknown predicate ‘-print.’ I presume the . isn’t really there. Precision is important.
Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Super User or Unix & Linux Stack Exchange would be a better place to ask. Also see Where do I post questions about Dev Ops?
3 Answers 3
find . -size +10000k -exec ls -sd <> +
If your version of find won’t accept the + notation (which acts rather like xargs does), then you might use (GNU find and xargs , so find probably supports + anyway):
find . -size +10000k -print0 | xargs -0 ls -sd
or you might replace the + with \; (and live with the relative inefficiency of this), or you might live with problems caused by spaces in names and use the portable:
find . -size +10000k -print | xargs ls -sd
The -d on the ls commands ensures that if a directory is ever found (unlikely, but. ), then the directory information will be printed, not the files in the directory. And, if you’re looking for files more than 1 MB (as a now-deleted comment suggested), you need to adjust the +10000k to 1000k or maybe +1024k , or +2048 (for 512-byte blocks, the default unit for -size ). This will list the size and then the file name. You could avoid the need for -d by adding -type f to the find command, of course.
Linux: Find files larger than given size (gb/mb/kb/bytes)
In this article, we will discuss how to recursively find files which are larger than a given size in Linux, using the find command.
Table of Contents
Many times we encounter a situation where we need to find huge files in Linux. These files can be log files or some other kind of data files. In such scenarios we need to search files by size. For this, we can easily use the find command in Linux.
The find command in Linux provides an easy way to search files recursively in a directory hierarchy. It also provides various options to do the selective search. One such option is “-size”, it helps to recursively search files by size.
Syntax of find command to find files bigger than given size in Linux
In the given , it will recursively search for the files whose size is greater than N. Here N is a number and along with it we can specify size unit type like,
Frequently Asked:
For example, “-size +4G” makes the find command to search for files greater than 4GB. Here, + sign is denote that look for files greater than or equal to N[Type], like in this case, -size +4G will make find command to look for files bigger than 4GB.
Let’s see some detailed examples of finding files greater than a given size,
Find files larger than 4gb in Linux
To find files larger than 4GB, we need to pass the -size option with value +4G in the find command.
/usr/logs/test_1_logs.txt /usr/logs/test_2_logs.txt
It recursively searched for files inside the folder “/usr” and filtered out the files with size larger than or equal to 4GB, then printed the paths of such files.
The previous command just printed the file paths which are greater than 4GB. If you want print the size along with file name then use this command,
find /usr -type f -size +4G -exec ls -lh <> \; | awk '< print $9 "|| Size : " $5 >'
/usr/logs/test_1_logs.txt|| Size : 4.6G /usr/logs/test_2_logs.txt|| Size : 7.2G
Find files larger than 1gb in Linux
To find files larger than 1GB, we need to pass the -size option with value +1G in the find command.
/usr/logs/error_logs.txt
/usr/logs/warning_logs.txt
It recursively searched for files inside the folder “/usr/” and filtered out the files with size larger than or equal to 1GB, then printed the paths of such files.
The previous command just printed the file paths which are greater than 1GB. If you want print the size along with file name then use this command,
find /usr -type f -size +1G -exec ls -lh <> \; | awk '< print $9 "|| Size : " $5 >'
/usr/logs/error_logs.txt|| Size : 1.6G /usr/logs/warning_logs.txt|| Size : 2.2G
Find files larger than 500mb in Linux
To find files larger than 500 MB, we need to pass the -size option with value +500M in the find command.
find /usr -type f -size +500M
It will recursively search for the files inside the folder “/usr/” and filter out the files with size larger than or equal to 500MB, then print the paths of each such files.
/usr/logs/test_3_logs.txt /usr/logs/test_4_logs.txt
To print file size along with with file paths for files larger than 500MB use this command,
find /usr -type f -size +500M -exec ls -lh <> \; | awk '< print $9 "|| Size : " $5 >'
It will print the file paths along with size for the files larger than 500MB.
/usr/logs/test_3_logs.txt|| Size : 610G /usr/logs/test_4_logs.txt|| Size : 712G
Find files larger than 100mb in Linux
To find files larger than 100 MB, we need to pass the -size option with value +100M in the find command.
find /usr -type f -size +100M
It will recursively search for the files inside the folder “/usr/” and filter out the files with size larger than or equal to 100MB, then print the paths of each such files. To print file size along with with file paths for files larger than 100MB use this command,
find /usr -type f -size +100M -exec ls -lh <> \; | awk '< print $9 "|| Size : " $5 >'
It will print the file paths along with size for the files larger than 100MB.
Find files larger than 50mb in Linux
To find files larger than 50 MB, we need to pass the -size option with value +50M in the find command.
It will recursively search for the files inside the folder “/usr/” and filter out the files with size larger than or equal to 50MB, then print the paths of each such files. To print file size along with with file paths for files larger than 50MB use this command,
find /usr -type f -size +50M -exec ls -lh <> \; | awk '< print $9 "|| Size : " $5 >'
It will print the file paths along with size for the files larger than 50MB.
Find files larger than 0 bytes in Linux
To find files larger than 0 Bytes, we need to pass the -size option with value +0b in the find command.
It will recursively search for the files inside the folder “/usr/” and filter out the files with size larger than or equal to 0 Bytes, then print the paths of each such files. To print file size along with with file paths for files larger than 0 Bytes use this command,
find /usr -type f -size +0b -exec ls -lh <> \; | awk '< print $9 "|| Size : " $5 >'
It will print the file paths along with size for the files larger than 0 bytes.
Related posts:
Leave a Comment Cancel Reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Terms of Use
Disclaimer
Copyright © 2023 thisPointer
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.