change file encoding recursively

Good: Bad: The second one will only work if find will not descend into sub directories, since the directory tree inside of converted will not be created on demand, as it would be the case e.g. for mkdir -p. The result will be a ‘file or directory not found’ error.

install a program (compiled binaries/ executables) accessible for all users

  1. Move the installation directory, eg. myapp, to /opt.
    $ sudo mv myapp /opt/
    
  2. Link the executable(s) into /usr/local/bin. This directory is per default in the $PATH environment variable and can therefore be executed by any user simply by typing mybinary instead of /usr/local/bin/mybinary.
    $ sudo ln -s /opt/myapp/bin/mybinary /usr/local/bin/
    
    If you have multiple executables to link, you can use wildcards as well:
    $ sudo ln -s /opt/myapp/bin/*.sh /usr/local/bin/
    
    For multiple executables that cannot be catched by any wildcard, you can use find to find all files in the directory that are executable and create a link:
    $ sudo find /opt/myapp -maxdepth 1 -type f -executable -exec ln -s {} /usr/local/bin/ \;
    
  3. Logout and login again to make changes to $PATH take effect.