How to see/determine on disk file size on Linux?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
On windows you can see the size actual size of a file/directory and the size on disk, this size on disk depends on block size.
How can I see this on Linux (mint)?
I have disk with thousands of pictures with varied sizes.
I want to see their actual size and the space they take up on disk, especially directories. On windows the difference can be in gigabytes of wasted space.
files linux-mint disk-usage
add a comment |Â
up vote
3
down vote
favorite
On windows you can see the size actual size of a file/directory and the size on disk, this size on disk depends on block size.
How can I see this on Linux (mint)?
I have disk with thousands of pictures with varied sizes.
I want to see their actual size and the space they take up on disk, especially directories. On windows the difference can be in gigabytes of wasted space.
files linux-mint disk-usage
Do you plan on recreating your filesystem(s) based on the results, in order to reduce this wasted space? Otherwise, it's a fact of life for most filesystems.
â Jeff Schaller
Oct 14 '17 at 0:13
yes that is what i wanted, to reduce wasted space or even just make two partition with different block sizes, one for video and another for images. because I like the video playback benefits of having huge block sizes(or is it just a placebo effect).
â user3130012
Oct 15 '17 at 8:24
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
On windows you can see the size actual size of a file/directory and the size on disk, this size on disk depends on block size.
How can I see this on Linux (mint)?
I have disk with thousands of pictures with varied sizes.
I want to see their actual size and the space they take up on disk, especially directories. On windows the difference can be in gigabytes of wasted space.
files linux-mint disk-usage
On windows you can see the size actual size of a file/directory and the size on disk, this size on disk depends on block size.
How can I see this on Linux (mint)?
I have disk with thousands of pictures with varied sizes.
I want to see their actual size and the space they take up on disk, especially directories. On windows the difference can be in gigabytes of wasted space.
files linux-mint disk-usage
edited Oct 14 '17 at 0:37
peterh
3,97092755
3,97092755
asked Oct 13 '17 at 23:10
user3130012
183
183
Do you plan on recreating your filesystem(s) based on the results, in order to reduce this wasted space? Otherwise, it's a fact of life for most filesystems.
â Jeff Schaller
Oct 14 '17 at 0:13
yes that is what i wanted, to reduce wasted space or even just make two partition with different block sizes, one for video and another for images. because I like the video playback benefits of having huge block sizes(or is it just a placebo effect).
â user3130012
Oct 15 '17 at 8:24
add a comment |Â
Do you plan on recreating your filesystem(s) based on the results, in order to reduce this wasted space? Otherwise, it's a fact of life for most filesystems.
â Jeff Schaller
Oct 14 '17 at 0:13
yes that is what i wanted, to reduce wasted space or even just make two partition with different block sizes, one for video and another for images. because I like the video playback benefits of having huge block sizes(or is it just a placebo effect).
â user3130012
Oct 15 '17 at 8:24
Do you plan on recreating your filesystem(s) based on the results, in order to reduce this wasted space? Otherwise, it's a fact of life for most filesystems.
â Jeff Schaller
Oct 14 '17 at 0:13
Do you plan on recreating your filesystem(s) based on the results, in order to reduce this wasted space? Otherwise, it's a fact of life for most filesystems.
â Jeff Schaller
Oct 14 '17 at 0:13
yes that is what i wanted, to reduce wasted space or even just make two partition with different block sizes, one for video and another for images. because I like the video playback benefits of having huge block sizes(or is it just a placebo effect).
â user3130012
Oct 15 '17 at 8:24
yes that is what i wanted, to reduce wasted space or even just make two partition with different block sizes, one for video and another for images. because I like the video playback benefits of having huge block sizes(or is it just a placebo effect).
â user3130012
Oct 15 '17 at 8:24
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
I think what you are looking for is du
. Executing du -s <directory>
shows you much disk space a directory's contents use up. du
can also count the sizes of each file in the directory individually and tell you how big their total content is:
du -s --apparent-size <directory>
If you want to know the amount of "wasted" space resulting from allocation in blocks, just subtract the second command's result from the first's.
Note: --apparent-size
reports the size in kilobytes. You can use the -b
flag instead, if you want to know the exact number of bytes a file contains. This is useful if you want to know how many bytes (without headers and such) you would need to send over the network to deliver the file, for example.
Thank you. du is what I was looking for. The combo.du -sh <directory>
for space on diskdu -b <directory>
for actual size
â user3130012
Oct 15 '17 at 8:03
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".
â Josiah Yoder
Sep 5 at 15:34
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
I think what you are looking for is du
. Executing du -s <directory>
shows you much disk space a directory's contents use up. du
can also count the sizes of each file in the directory individually and tell you how big their total content is:
du -s --apparent-size <directory>
If you want to know the amount of "wasted" space resulting from allocation in blocks, just subtract the second command's result from the first's.
Note: --apparent-size
reports the size in kilobytes. You can use the -b
flag instead, if you want to know the exact number of bytes a file contains. This is useful if you want to know how many bytes (without headers and such) you would need to send over the network to deliver the file, for example.
Thank you. du is what I was looking for. The combo.du -sh <directory>
for space on diskdu -b <directory>
for actual size
â user3130012
Oct 15 '17 at 8:03
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".
â Josiah Yoder
Sep 5 at 15:34
add a comment |Â
up vote
2
down vote
accepted
I think what you are looking for is du
. Executing du -s <directory>
shows you much disk space a directory's contents use up. du
can also count the sizes of each file in the directory individually and tell you how big their total content is:
du -s --apparent-size <directory>
If you want to know the amount of "wasted" space resulting from allocation in blocks, just subtract the second command's result from the first's.
Note: --apparent-size
reports the size in kilobytes. You can use the -b
flag instead, if you want to know the exact number of bytes a file contains. This is useful if you want to know how many bytes (without headers and such) you would need to send over the network to deliver the file, for example.
Thank you. du is what I was looking for. The combo.du -sh <directory>
for space on diskdu -b <directory>
for actual size
â user3130012
Oct 15 '17 at 8:03
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".
â Josiah Yoder
Sep 5 at 15:34
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
I think what you are looking for is du
. Executing du -s <directory>
shows you much disk space a directory's contents use up. du
can also count the sizes of each file in the directory individually and tell you how big their total content is:
du -s --apparent-size <directory>
If you want to know the amount of "wasted" space resulting from allocation in blocks, just subtract the second command's result from the first's.
Note: --apparent-size
reports the size in kilobytes. You can use the -b
flag instead, if you want to know the exact number of bytes a file contains. This is useful if you want to know how many bytes (without headers and such) you would need to send over the network to deliver the file, for example.
I think what you are looking for is du
. Executing du -s <directory>
shows you much disk space a directory's contents use up. du
can also count the sizes of each file in the directory individually and tell you how big their total content is:
du -s --apparent-size <directory>
If you want to know the amount of "wasted" space resulting from allocation in blocks, just subtract the second command's result from the first's.
Note: --apparent-size
reports the size in kilobytes. You can use the -b
flag instead, if you want to know the exact number of bytes a file contains. This is useful if you want to know how many bytes (without headers and such) you would need to send over the network to deliver the file, for example.
answered Oct 14 '17 at 0:56
PawkyPenguin
696110
696110
Thank you. du is what I was looking for. The combo.du -sh <directory>
for space on diskdu -b <directory>
for actual size
â user3130012
Oct 15 '17 at 8:03
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".
â Josiah Yoder
Sep 5 at 15:34
add a comment |Â
Thank you. du is what I was looking for. The combo.du -sh <directory>
for space on diskdu -b <directory>
for actual size
â user3130012
Oct 15 '17 at 8:03
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".
â Josiah Yoder
Sep 5 at 15:34
Thank you. du is what I was looking for. The combo.
du -sh <directory>
for space on disk du -b <directory>
for actual sizeâ user3130012
Oct 15 '17 at 8:03
Thank you. du is what I was looking for. The combo.
du -sh <directory>
for space on disk du -b <directory>
for actual sizeâ user3130012
Oct 15 '17 at 8:03
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".â Josiah Yoder
Sep 5 at 15:34
du -sb --apparent-size filename
returns exactly the same number as Windows's Properties Dialog's "Size (... bytes)".â Josiah Yoder
Sep 5 at 15:34
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f398033%2fhow-to-see-determine-on-disk-file-size-on-linux%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Do you plan on recreating your filesystem(s) based on the results, in order to reduce this wasted space? Otherwise, it's a fact of life for most filesystems.
â Jeff Schaller
Oct 14 '17 at 0:13
yes that is what i wanted, to reduce wasted space or even just make two partition with different block sizes, one for video and another for images. because I like the video playback benefits of having huge block sizes(or is it just a placebo effect).
â user3130012
Oct 15 '17 at 8:24