List files bigger than filesize specified
up vote
67
down vote
favorite
How can I make ls (or any other command) list only files bigger than a specific file size?
linux bash terminal
add a comment |
up vote
67
down vote
favorite
How can I make ls (or any other command) list only files bigger than a specific file size?
linux bash terminal
add a comment |
up vote
67
down vote
favorite
up vote
67
down vote
favorite
How can I make ls (or any other command) list only files bigger than a specific file size?
linux bash terminal
How can I make ls (or any other command) list only files bigger than a specific file size?
linux bash terminal
linux bash terminal
edited Dec 5 at 9:07
asked Jan 15 '11 at 14:59
Johnny
445148
445148
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
117
down vote
accepted
Use find and its -size
flag.
To find files larger than 100MB:
find . -type f -size +100M
If you want the current dir only:
find . -maxdepth 1 -type f -size +100M
1
If you need to pass the size in bytes, usefind . -type f -size +4096c
(superuser.com/a/204571/111289)
– aexl
Aug 8 '17 at 9:19
add a comment |
up vote
19
down vote
If you wish to see all files over 100M and to see where they are and what is their size try this:
find . -type f -size +100M -exec ls -lh {} ;
1
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
1
I think it would be easier to use printf parameter-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find
– Nux
Nov 12 '14 at 13:53
@Nux: nice tip.-printf '%9s %pn'
worked well for me.
– seanf
May 29 '15 at 5:40
add a comment |
up vote
2
down vote
Use the following:
find / -size gt 2MB
or:
find / -size => 2000000
3
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
I like thegt
and=>
. Thanks.
– harperville
Feb 7 at 0:19
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f233616%2flist-files-bigger-than-filesize-specified%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
117
down vote
accepted
Use find and its -size
flag.
To find files larger than 100MB:
find . -type f -size +100M
If you want the current dir only:
find . -maxdepth 1 -type f -size +100M
1
If you need to pass the size in bytes, usefind . -type f -size +4096c
(superuser.com/a/204571/111289)
– aexl
Aug 8 '17 at 9:19
add a comment |
up vote
117
down vote
accepted
Use find and its -size
flag.
To find files larger than 100MB:
find . -type f -size +100M
If you want the current dir only:
find . -maxdepth 1 -type f -size +100M
1
If you need to pass the size in bytes, usefind . -type f -size +4096c
(superuser.com/a/204571/111289)
– aexl
Aug 8 '17 at 9:19
add a comment |
up vote
117
down vote
accepted
up vote
117
down vote
accepted
Use find and its -size
flag.
To find files larger than 100MB:
find . -type f -size +100M
If you want the current dir only:
find . -maxdepth 1 -type f -size +100M
Use find and its -size
flag.
To find files larger than 100MB:
find . -type f -size +100M
If you want the current dir only:
find . -maxdepth 1 -type f -size +100M
edited Mar 11 '13 at 2:12
Drew Noakes
1,45211324
1,45211324
answered Jan 15 '11 at 15:11
Nifle
27.8k2393128
27.8k2393128
1
If you need to pass the size in bytes, usefind . -type f -size +4096c
(superuser.com/a/204571/111289)
– aexl
Aug 8 '17 at 9:19
add a comment |
1
If you need to pass the size in bytes, usefind . -type f -size +4096c
(superuser.com/a/204571/111289)
– aexl
Aug 8 '17 at 9:19
1
1
If you need to pass the size in bytes, use
find . -type f -size +4096c
(superuser.com/a/204571/111289)– aexl
Aug 8 '17 at 9:19
If you need to pass the size in bytes, use
find . -type f -size +4096c
(superuser.com/a/204571/111289)– aexl
Aug 8 '17 at 9:19
add a comment |
up vote
19
down vote
If you wish to see all files over 100M and to see where they are and what is their size try this:
find . -type f -size +100M -exec ls -lh {} ;
1
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
1
I think it would be easier to use printf parameter-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find
– Nux
Nov 12 '14 at 13:53
@Nux: nice tip.-printf '%9s %pn'
worked well for me.
– seanf
May 29 '15 at 5:40
add a comment |
up vote
19
down vote
If you wish to see all files over 100M and to see where they are and what is their size try this:
find . -type f -size +100M -exec ls -lh {} ;
1
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
1
I think it would be easier to use printf parameter-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find
– Nux
Nov 12 '14 at 13:53
@Nux: nice tip.-printf '%9s %pn'
worked well for me.
– seanf
May 29 '15 at 5:40
add a comment |
up vote
19
down vote
up vote
19
down vote
If you wish to see all files over 100M and to see where they are and what is their size try this:
find . -type f -size +100M -exec ls -lh {} ;
If you wish to see all files over 100M and to see where they are and what is their size try this:
find . -type f -size +100M -exec ls -lh {} ;
answered May 21 '14 at 17:30
Ofir Zvik
19112
19112
1
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
1
I think it would be easier to use printf parameter-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find
– Nux
Nov 12 '14 at 13:53
@Nux: nice tip.-printf '%9s %pn'
worked well for me.
– seanf
May 29 '15 at 5:40
add a comment |
1
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
1
I think it would be easier to use printf parameter-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find
– Nux
Nov 12 '14 at 13:53
@Nux: nice tip.-printf '%9s %pn'
worked well for me.
– seanf
May 29 '15 at 5:40
1
1
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
Does the same as @Nifle's first command
– Canadian Luke
May 21 '14 at 17:33
1
1
I think it would be easier to use printf parameter
-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find– Nux
Nov 12 '14 at 13:53
I think it would be easier to use printf parameter
-printf "%p %s"
. See: unixhelp.ed.ac.uk/CGI/man-cgi?find– Nux
Nov 12 '14 at 13:53
@Nux: nice tip.
-printf '%9s %pn'
worked well for me.– seanf
May 29 '15 at 5:40
@Nux: nice tip.
-printf '%9s %pn'
worked well for me.– seanf
May 29 '15 at 5:40
add a comment |
up vote
2
down vote
Use the following:
find / -size gt 2MB
or:
find / -size => 2000000
3
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
I like thegt
and=>
. Thanks.
– harperville
Feb 7 at 0:19
add a comment |
up vote
2
down vote
Use the following:
find / -size gt 2MB
or:
find / -size => 2000000
3
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
I like thegt
and=>
. Thanks.
– harperville
Feb 7 at 0:19
add a comment |
up vote
2
down vote
up vote
2
down vote
Use the following:
find / -size gt 2MB
or:
find / -size => 2000000
Use the following:
find / -size gt 2MB
or:
find / -size => 2000000
edited Feb 28 '17 at 7:36
user477799
answered Feb 27 '17 at 7:23
Farhan Ahmed
211
211
3
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
I like thegt
and=>
. Thanks.
– harperville
Feb 7 at 0:19
add a comment |
3
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
I like thegt
and=>
. Thanks.
– harperville
Feb 7 at 0:19
3
3
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
How does this improve the accepted answer?
– Dave M
Feb 27 '17 at 13:18
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information.
– Toby Speight
Feb 27 '17 at 13:42
I like the
gt
and =>
. Thanks.– harperville
Feb 7 at 0:19
I like the
gt
and =>
. Thanks.– harperville
Feb 7 at 0:19
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f233616%2flist-files-bigger-than-filesize-specified%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown