diff --git a/bash-scripting/getting-the-size-of-a-file.md b/bash-scripting/getting-the-size-of-a-file.md new file mode 100644 index 0000000..ae690cf --- /dev/null +++ b/bash-scripting/getting-the-size-of-a-file.md @@ -0,0 +1,6 @@ +You can get the size of a file in bytes with: +``` +stat -c %s file_name +# example +size=$(stat -c %s $myfile) +```