Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Typical mechanisms look like:</p> <pre><code>for f in glob; do command $f ; done </code></pre> <p>I often run commands like: <code>for f in *; do echo -n "$f " ; cat $f ; done</code> to see the contents of all the files in a directory. (Especially nice with <code>/proc/sys/kernel/</code>-style directories, where all the files have very short contents.)</p> <p>or</p> <pre><code>find . -type f -exec command {} \; </code></pre> <p>or</p> <pre><code>find . -type f -print0 | xargs -0 command parameters </code></pre> <p>Something like <code>find . -type f -exec file {} \;</code> or <code>find . -type f -print0 | xargs -0 file</code> (only works if the command accepts multiple filenames during input).</p> <p>Of course, if the program accepts multiple filename arguments (like <code>cat</code> or <code>more</code> or similar Unix shell tools) and all the files are in a single directory, you can very easily run: <code>cat *</code> (show contents of all files in the directory) or <code>cat *.*</code> (show contents of all files with a period in the filename).</p> <p>If you frequently want "all files in all [sub]*directories", the zsh <a href="http://zsh.sourceforge.net/Guide/zshguide05.html#l140" rel="nofollow"><code>**/</code></a> option can be handy: <code>ls -l **/*.c</code> would show you <code>foo/bar/baz.c</code> and <code>/blort/bleet/boop.c</code> at once. Neat tool, but I usually don't mind writing the <code>find</code> command equivalent, I just don't need it that often. (And zsh isn't installed everywhere, so relying on its features could be frustrating in the future.)</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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