1# Print the size of the given file in bytes. The file name 2# is given in the environment variable FILE_TO_CHECK. The 3# file name FILE_TO_CHECK is given relative to the data directory. 4# 5# Usage: 6# 7# let MYSQLD_DATADIR=`SELECT @@datadir`; 8# let FILE_TO_CHECK=test/t1.ibd; 9# --source include/show_file_size.inc 10# 11 12perl; 13 my $file = $ENV{'MYSQLD_DATADIR'}.$ENV{'FILE_TO_CHECK'}; 14 my $size = -s "$file"; 15 print "The size of file '" . $ENV{FILE_TO_CHECK} . "' is $size bytes.\n"; 16EOF 17 18