Restore some configuration files

Sometimes I do not want to reuse my old $HOME/.kde folder completely or other hidden folders after I reinstalled the operating system. In this case I want to copy only selected folders and file to the new $HOME. This script does most of the necessary copy operations...

Local network shares with linux

[TOC] NFS shares First NFS needs to be activated (client and server), then we can start with the configuration files. Configuration files The exported shares are listed in /etc/exports /home/links/Musik/ 192.168.2.0/255.255.255.0(ro,root_squash,sync)...

shell: is the device mounted ?

The following function allows to test if a device is already mounted. #!/bin/sh # ——————————————————— # function is_mounted () { # 1. mount aufrufen. # 2....

shell: does the server exist ?

The following function allows to test for the existens of a server in the network via ping, but with a better interface #!/bin/sh # ——————————————————— #...

bash: Copy everthing except …

If you want to copy multiple files, keep the permission, and want to exclude multiple files from being copied this can be done with the following code: tar cp –exclude-from=$EXCLUDE $FROMDIR | (cd $DESTDIR ; tar xpv) $EXCLUDE contains the file that contains the...