Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since you asked for an explanation...</p> <pre><code>find . -type f -print0 </code></pre> <p>That's the <code>find</code> utility, which travels through the file system to find something that matches what you want it to. The <code>.</code> essentially means it will try to find anything, but since you specified <code>-type f</code> it will only find "regular files." <code>-print0</code>, as you may have guessed, simply prints the full path to the standard output (useful for piping). It uses a null character at the end of each line (as opposed to <code>-print</code>, this will be relevant in a moment).</p> <pre><code>xargs -0 ls -l </code></pre> <p><code>xargs</code> takes a list of things from standard input and then executes a given command ("utility") using what is passed to it as an argument. In this case, the utility is the command <code>ls -l</code> so xargs takes the results from <code>find</code> and performs <code>ls -l</code> on them, giving you the long, full path; this is basically just a way to turn your list of files into a list of files with information such as size. The <code>-0</code> option allows xargs to interpret null characters as the separator between lines, which exists (almost?) solely to allow it to work with the <code>-print0</code> option above.</p> <pre><code>sort -k5,5rn &gt; ~/files.txt </code></pre> <p><code>sort</code> is pretty cool. It sorts things. <code>-k</code> tells it which column to sort by, in this case column 5 (and only column 5). The <code>rn</code> bit means sort using numbers and reverse the order. The default is largest at the bottom so this puts largest first. Sorting numerically can get confusing if you use unit-suffixes (B, K, M, G, etc.) using <code>ls -lh</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload