4 <h1><a name=
"bash" id=
"bash">Bash
</a></h1>
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"/>
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>
19 Sometimes you can
'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:
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"/>
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>
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:
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">>></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"/>
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>
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:
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">>></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"/>
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>
71 <pre class=
"code bash">$ :
<span class=
"br0">(</span><span class=
"br0">)</span><span class=
"br0">{</span> :
<span class=
"sy0">|
</span>:
<span class=
"sy0">&</span><span class=
"br0">}</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"/>
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>
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"/>
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>
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"/>
101 <!-- SECTION "How to see folder sizes" [1414-] -->