Skip to content

Commit

Permalink
Use stat to determine filesize in bytes (replaces du on Linux systems)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkalis committed Aug 29, 2016
1 parent 3605c33 commit 96a8e81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Prerequisites
- `cut` is used for value extraction from the filtered json output.
- `xargs` is used for multi-threaded file uploads.
- `dd` is used for chunked file uploads.
- `du` is used to determine the filesize.
- On OSX `stat` is used instead of `du` to determine the filesize.
- `stat` is used to determine the filesize.

Getting started (OneDrive Personal)
---------------
Expand Down
2 changes: 1 addition & 1 deletion onedrive-base
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function filesystem_get_filesize() {
if [[ $(uname) == "Darwin" ]]; then
stat -f%z "$1"
else
du -b "$1" | cut -f1
stat -c%s "$1"
fi
}

Expand Down

0 comments on commit 96a8e81

Please sign in to comment.