1
0
Fork 0

update TIKHTG with some basic find stuff

main
will 1 year ago
parent 3a5c75d3e3
commit ae34095f5c

@ -71,6 +71,11 @@
<tr><td><code>sed "s/^a/b/"</code></td><td>Require that a match be at the beginning of the line.</td></tr>
<tr><td><code>sed "s/a$/b/"</code></td><td>Require that a match be at the end of the line.</td></tr>
<tr><td><code>sed "s/^a$/b/"</code></td><td>Require that a match be both at the beginning and the end - in other words, require that a match be the entire line.</td></tr>
<tr><td colspan="2"><h4>find</h4></td></tr>
<tr><td><code>find</code></td><td>Lists every file and directory in the current working directory</td></tr>
<tr><td><code>find /dir</code></td><td>Does the same for the directory you specify</td></tr>
<tr><td><code>find -name "foo"</code></td><td>Only lists things with a matching name. * can be used as a wildcard.</td></tr>
<tr><td><code>find -exec command {} \;</code></td><td>Runs <code>command</code> on everything found by <code>find</code>. <code>{}</code> is replaced by the output.</td></tr>
<tr><td colspan="2"><h4>misc</h4></td></tr>
<tr><td><code>xrandr --output &lt;display name&gt; --brightness &lt;brightness&gt;</code></td><td title="It would definitely for sure be better to change this via the monitor's built-in menus, but that requires navigating both of my monitors' built-in menus.">Janky software-side display brightness setting with xrandr</td></tr>
<tr><td><code>wget "https://example.com/file.zip" -O temp.zip; unzip temp.zip; rm temp.zip</code></td><td>Bash one-liner to unzip a file from the internet to the current directory</td></tr>

Loading…
Cancel
Save