backup de julho
[h2N7SspZmY.git] / data / cache / 8 / 8ae2545e610cd1e96787a9c4f256471a.xhtml
blob1e5c1f606951890a487b39b8282978d5d557d2ba
4 <h1><a name="bash" id="bash">Bash</a></h1>
5 <div class="level1">
6 <div class="plugin_uparrow">
7 <a href="#" title="Back to top">
8 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
9 </a>
10 </div>
12 </div>
13 <!-- SECTION "Bash" [1-20] -->
14 <h2><a name="how_to_change_escape_characters_association" id="how_to_change_escape_characters_association">How to change escape characters association</a></h2>
15 <div class="level2">
17 <p>
19 Sometimes you can&#039;t send a program some characters association (e.g. Ctrl+S) because the bash window intercepts then. In order to the program to work correctly, you must remove this character association from bash. Here is an example:
20 </p>
21 <pre class="code bash"><span class="co0"># see escape characters association</span>
22 $ <span class="kw2">stty</span> <span class="re5">-a</span>
23 <span class="co0"># shows ... ; stop = ^S; ...</span>
24 <span class="co0"># let's associate stop to Ctrl+Q</span>
25 $ <span class="kw2">stty</span> stop ^Q
26 <span class="co0"># now CTRL-S will be passed to the program running inside the bash</span></pre>
27 <div class="plugin_uparrow">
28 <a href="#" title="Back to top">
29 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
30 </a>
31 </div>
33 </div>
34 <!-- SECTION "How to change escape characters association" [21-524] -->
35 <h2><a name="how_to_change_bash_configuration" id="how_to_change_bash_configuration">How to change bash configuration</a></h2>
36 <div class="level2">
38 <p>
40 The file ~/.bashrc is read and executed every time you open bash. So if you want that a configuration change (like stty) to be true the next time you open bash, you must append it to the ~/.bashrc. Here is an example code:
41 </p>
42 <pre class="code bash"><span class="co0"># append to ~/.bashrc</span>
43 $ <span class="kw3">echo</span> <span class="st_h">'stty stop ^Q'</span> <span class="sy0">&gt;&gt;</span> ~<span class="sy0">/</span>.bashrc</pre>
44 <div class="plugin_uparrow">
45 <a href="#" title="Back to top">
46 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
47 </a>
48 </div>
50 </div>
51 <!-- SECTION "How to change bash configuration" [525-872] -->
52 <h2><a name="how_to_use_same_bash_configuration_file_on_many_pcs" id="how_to_use_same_bash_configuration_file_on_many_pcs">How to use same bash configuration file on many PCs</a></h2>
53 <div class="level2">
55 <p>
57 If order to use the same configuration file on many PCs (e.g. your work and you home), you can include your main file on the ~/.bashrc of those PCs. Example:
58 </p>
59 <pre class="code bash"><span class="co0"># append to ~/.bashrc (do this on each PC)</span>
60 $ <span class="kw3">echo</span> <span class="st_h">'source /path/to/your/main/configuration/file/.bashrc'</span> <span class="sy0">&gt;&gt;</span> ~<span class="sy0">/</span>.bashrc</pre>
61 <div class="plugin_uparrow">
62 <a href="#" title="Back to top">
63 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
64 </a>
65 </div>
67 </div>
68 <!-- SECTION "How to use same bash configuration file on many PCs" [873-1235] -->
69 <h2><a name="how_to_make_a_fork_bomb" id="how_to_make_a_fork_bomb">How to make a fork bomb</a></h2>
70 <div class="level2">
71 <pre class="code bash">$ :<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span> :<span class="sy0">|</span>:<span class="sy0">&amp;</span><span class="br0">&#125;</span>;:</pre>
72 <div class="plugin_uparrow">
73 <a href="#" title="Back to top">
74 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
75 </a>
76 </div>
78 </div>
79 <!-- SECTION "How to make a fork bomb" [1236-1308] -->
80 <h2><a name="how_to_recursively_change_file_permissions" id="how_to_recursively_change_file_permissions">How to recursively change file permissions</a></h2>
81 <div class="level2">
82 <pre class="code bash">$ <span class="kw2">chmod</span> a+rwx <span class="re5">-R</span> foldername</pre>
83 <div class="plugin_uparrow">
84 <a href="#" title="Back to top">
85 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
86 </a>
87 </div>
89 </div>
90 <!-- SECTION "How to recursively change file permissions" [1309-1413] -->
91 <h2><a name="how_to_see_folder_sizes" id="how_to_see_folder_sizes">How to see folder sizes</a></h2>
92 <div class="level2">
93 <pre class="code bash">$ <span class="kw2">du</span> <span class="sy0">*</span> <span class="re5">-s</span> <span class="sy0">|</span> <span class="kw2">sort</span> <span class="re5">-rg</span></pre>
94 <div class="plugin_uparrow">
95 <a href="#" title="Back to top">
96 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
97 </a>
98 </div>
100 </div>
101 <!-- SECTION "How to see folder sizes" [1414-] -->