Linux Bash - How to remove part of the filename of a file contained in folder
<p>I have several directories containing files whose names contain the name of the folder more other words.
Example:</p>

<pre><code>one/berg - one.txt
two/tree - two.txt
three/water - three.txt
</code></pre>

<p>and I would like to remain so:</p>

<pre><code>one/berg.txt
two/tree.txt
three/water.txt
</code></pre>

<p>I tried with the sed command, find command, for command, etc.
I fail has to find a way to get it.</p>

<p>Could you help me?. Thank you</p>