How to use wc, grep and ls to list all files that are at least 10,000,000 bytes in a directory? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0
















This question already has an answer here:



  • Finding all large files in the root filesystem

    3 answers



Now I find that wc -c could show the size of file, then how to select them and list them?
It should be a single pipeline of commands.










share|improve this question















marked as duplicate by Kusalananda, Jeff Schaller, Tomasz, αғsнιη, Rui F Ribeiro Feb 11 at 15:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • Also web search

    – Kusalananda
    Feb 11 at 15:01












  • Note that using wc to find the sizes of really big files is just masochism. It would need to read the whole file and count each individual byte. The file size information is already stored as meta-data in the directory.

    – Kusalananda
    Feb 11 at 15:04












  • Better use the faster "du" command instead of "wc". du -b does the same as wc -c (output in bytes).

    – Freddy
    Feb 11 at 15:08











  • Related: grep search for any number in a range

    – Mark Plotnick
    Feb 11 at 17:50















0
















This question already has an answer here:



  • Finding all large files in the root filesystem

    3 answers



Now I find that wc -c could show the size of file, then how to select them and list them?
It should be a single pipeline of commands.










share|improve this question















marked as duplicate by Kusalananda, Jeff Schaller, Tomasz, αғsнιη, Rui F Ribeiro Feb 11 at 15:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • Also web search

    – Kusalananda
    Feb 11 at 15:01












  • Note that using wc to find the sizes of really big files is just masochism. It would need to read the whole file and count each individual byte. The file size information is already stored as meta-data in the directory.

    – Kusalananda
    Feb 11 at 15:04












  • Better use the faster "du" command instead of "wc". du -b does the same as wc -c (output in bytes).

    – Freddy
    Feb 11 at 15:08











  • Related: grep search for any number in a range

    – Mark Plotnick
    Feb 11 at 17:50













0












0








0









This question already has an answer here:



  • Finding all large files in the root filesystem

    3 answers



Now I find that wc -c could show the size of file, then how to select them and list them?
It should be a single pipeline of commands.










share|improve this question

















This question already has an answer here:



  • Finding all large files in the root filesystem

    3 answers



Now I find that wc -c could show the size of file, then how to select them and list them?
It should be a single pipeline of commands.





This question already has an answer here:



  • Finding all large files in the root filesystem

    3 answers







command-line wc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 11 at 15:21









Rui F Ribeiro

41.1k1480138




41.1k1480138










asked Feb 11 at 14:54









ArTyNKBArTyNKB

11




11




marked as duplicate by Kusalananda, Jeff Schaller, Tomasz, αғsнιη, Rui F Ribeiro Feb 11 at 15:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Kusalananda, Jeff Schaller, Tomasz, αғsнιη, Rui F Ribeiro Feb 11 at 15:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Also web search

    – Kusalananda
    Feb 11 at 15:01












  • Note that using wc to find the sizes of really big files is just masochism. It would need to read the whole file and count each individual byte. The file size information is already stored as meta-data in the directory.

    – Kusalananda
    Feb 11 at 15:04












  • Better use the faster "du" command instead of "wc". du -b does the same as wc -c (output in bytes).

    – Freddy
    Feb 11 at 15:08











  • Related: grep search for any number in a range

    – Mark Plotnick
    Feb 11 at 17:50

















  • Also web search

    – Kusalananda
    Feb 11 at 15:01












  • Note that using wc to find the sizes of really big files is just masochism. It would need to read the whole file and count each individual byte. The file size information is already stored as meta-data in the directory.

    – Kusalananda
    Feb 11 at 15:04












  • Better use the faster "du" command instead of "wc". du -b does the same as wc -c (output in bytes).

    – Freddy
    Feb 11 at 15:08











  • Related: grep search for any number in a range

    – Mark Plotnick
    Feb 11 at 17:50
















Also web search

– Kusalananda
Feb 11 at 15:01






Also web search

– Kusalananda
Feb 11 at 15:01














Note that using wc to find the sizes of really big files is just masochism. It would need to read the whole file and count each individual byte. The file size information is already stored as meta-data in the directory.

– Kusalananda
Feb 11 at 15:04






Note that using wc to find the sizes of really big files is just masochism. It would need to read the whole file and count each individual byte. The file size information is already stored as meta-data in the directory.

– Kusalananda
Feb 11 at 15:04














Better use the faster "du" command instead of "wc". du -b does the same as wc -c (output in bytes).

– Freddy
Feb 11 at 15:08





Better use the faster "du" command instead of "wc". du -b does the same as wc -c (output in bytes).

– Freddy
Feb 11 at 15:08













Related: grep search for any number in a range

– Mark Plotnick
Feb 11 at 17:50





Related: grep search for any number in a range

– Mark Plotnick
Feb 11 at 17:50










1 Answer
1






active

oldest

votes


















3














find will be better:



find . -type f -size +9999999c


Replace . with the directory.






share|improve this answer























  • Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

    – Freddy
    Feb 11 at 15:16


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














find will be better:



find . -type f -size +9999999c


Replace . with the directory.






share|improve this answer























  • Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

    – Freddy
    Feb 11 at 15:16
















3














find will be better:



find . -type f -size +9999999c


Replace . with the directory.






share|improve this answer























  • Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

    – Freddy
    Feb 11 at 15:16














3












3








3







find will be better:



find . -type f -size +9999999c


Replace . with the directory.






share|improve this answer













find will be better:



find . -type f -size +9999999c


Replace . with the directory.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 11 at 14:59









TomaszTomasz

10.1k53067




10.1k53067












  • Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

    – Freddy
    Feb 11 at 15:16


















  • Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

    – Freddy
    Feb 11 at 15:16

















Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

– Freddy
Feb 11 at 15:16






Modified to also print the file sizes in bytes and sorted by file size (largest files first): find . -type f -size +9999999c -print0 | xargs -0 du -b | sort -nr

– Freddy
Feb 11 at 15:16



Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)