nav-left cat-right
cat-right

Local network shares with linux

NFS sharesConfiguration filesautomountsetup cron job 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) /home/links/Install/ 192.168.2.0/255.255.255.0(ro,root_squash,sync) /home/matthias/...

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. Mit grep Zeile mit $MOUNTDIR ausfiltern. # 3. Anzahl der Zeilen zaehlen. # 4. Alle Leerzeichen entfernen. # Wenn eine Zeile vorhanden war, ist der Wert von RETURN 1   MOUNTDIR=$1 TESTVALUE=$(mount | grep $MOUNTDIR...

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   # --------------------------------------------------------- # function server_exists () { # ping Optionen: # -c : Anzahl von pings # -n : nur numerisch, keine DNS Abfragen TESTSERVER=$1 if (ping -c 1 -n -w 2 $TESTSERVER > /dev/null 2>&1) ; then # echo...

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)tar cp --exclude-from=$EXCLUDE $FROMDIR | (cd $DESTDIR ; tar xpv) $EXCLUDE contains the file that contains the folders and files that shall be exluded. It can be created and filled with...

Find the programm, that prohibits the unmounting o...

The simple solution is the command „lsof“ which means „list of files“, invoked with lsof /dev/hdclsof /dev/hdc if /dev/hdc is the cdrom would give the list of files and programs which prohibit...
Seite 3 von 41234