![]() ![]() the b suffix, which is the default suffix used when no suffix is given, represents 512-byte blocks.The following command will fild all files recursively from the current directory that have a file size greater than 96 Kilobytes:įind * -size +96k List of available size suffixes that can be used with the Linux 'find' commandĪll of the suffixes which you can use to specify what unit of measurement the 'file' command should use such as Kilobytes, Megabytes, or Gigabytes and so forth are as follows: Ok, so let's take the above 'find' command example and modify it so that we're searching for files based on their size in Kilobytes. I'm not sure if the 'find' command has an option to specify the size of a file in terabytes, but if you can't find a file that's over a terabyte in size - you must have a pretty big hard drive. Whereas the previous commands found files based on their size in bytes, you could also find files based on their size in Kilobytes, Megabytes, or Gigabytes. To achieve this, you would run the 'find' command like this:įind * -size +96180c Find files with a size less than a specified sizeĪnd if you'd like to find files less than 96180 bytes, then you'd modify the previous command like so, changing the '+' sign to a '-' sign:įind * -size -96180c Find files specifying size in bytes, kilobytes, megabytes, or gigabytes ![]() Linux 'find' files of a certain size examples Find files with a size greater than a specified sizeĮxample, let's say you want to find all files with a size greater than 96180 bytes under the current directory. If you don't know the exact size of the file you want to find, which you often won't, you can also use the 'find' command to find files which are larger than or smaller than a certain size. ![]() In Linux, you can find files of a certain size from the command line using the 'find' command. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |