Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:01:23+00:00 2026-06-14T02:01:23+00:00

How can I display all files greater than 10k bytes in my current directory

  • 0

How can I display all files greater than 10k bytes in my current directory and it’s subdirectories.

Tried ls -size +10k but that didn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:01:24+00:00Added an answer on June 14, 2026 at 2:01 am

    find . -size +10k -exec ls -lh {} \+

    the first part of this is identical to @sputnicks answer, and sucesffully finds all files in the directory over 10k (don’t confuse k with K), my addition, the second part then executes ls -lh or ls that lists(-l) the files by human readable size(-h). negate the h if you prefer. of course the {} is the file itself, and the \+ is simply an alternative to \;

    which in practice \; would repeat or:

    ls -l found.file; ls -l found.file.2; ls -l found.file.3

    where \+ display it as one statement or:

    ls -l found.file found.file.2 found.file.3

    more on \; vs + with find

    Additionaly, you may want the listing ordered by size. Which is relatively easy to accomplish. I would at the -s option to ls, so ls -ls and then pipe it to sort -n to sort numerically

    which would become:

    find . -size +10k -exec ls -ls {} \+ | sort -n

    or in reverse order add an -r :

    find . -size +10k -exec ls -ls {} \+ | sort -nr

    finally, your title says find biggest file in directory. You can do that by then piping the code to tail

    find . -size +10k -exec ls -ls {} \+ | sort -n | tail -1
    would find you the largest file in the directory and its sub directories.

    note you could also sort files by size by using -S, and negate the need for sort. but to find the largest file you would need to use head so

    find . -size +10k -exec ls -lS {} \+ | head -1

    the benefit of doing it with -S and not sort is one, you don’t have to type sort -n and two you can also use -h the human readable size option. which is one of my favorite to use, but is not available with older versisions of ls, for example we have an old centOs 4 server at work that doesn’t have -h

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following program list me all files in a directory but how can I display
I want to display an activity chooser that shows all apps that can VIEW
I have found a useful shell script that shows all files in a directory
how can i display all the files (.pdf, .doc, .ppt, .mp4, etc...) inside a
I want to display all the files that are modified after a specified date
Is there anyway I can get the total size of all files queued from
How i can display all applications icons and name which are installed in device
i'm working on a windows software which can display all the users, groups and
How can I display the content of all Views in a db in SQL
How can I set all images in one line and display only the first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.