2 # ################################################################
3 # Copyright (c) Meta Platforms, Inc. and affiliates.
6 # This source code is licensed under both the BSD-style license (found in the
7 # LICENSE file in the root directory of this source tree) and the GPLv2 (found
8 # in the COPYING file in the root directory of this source tree).
9 # You may select, at your option, one of the above-listed licenses.
10 # ################################################################
16 if len(sys.argv) != 3:
17 print(f"Usage: {sys.argv[0]} FILE SIZE_LIMIT")
21 limit = int(sys.argv[2])
23 if not os.path.exists(file):
24 print(f"{file} does not exist")
27 size = os.path.getsize(file)
30 print(f"file {file} is {size} bytes, which is greater than the limit of {limit} bytes")