I am using SSH to access my Ubuntu system and I have 100s of files across 100s of folders which are called xxxxx.mail.log or xxxx.mail.log.xxxI need to list all these files, and see their file size.I have already tried ncdu, which works, but I cant search for filenames with it. Doing it manually with ncdu takes hours.Whats the easiest way to search my system for all files that contain mail.log in their filename, and have them listed and display the file size?
Finding all files based on partial filename match and display file size
terminal;find
Tryfind / -name *mail.log* -printf %s\t%p\n-printf prints some information about each match, in this case:%s - size of file in bytes\t - tab for spacing%p - pathname\n - newlineSee man find and search for printf format to list all possibilities for the printf statement.