nav-left cat-right
cat-right

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...

D-Link DWL-G510 with OpenSuse 10.2

State of driver in Opensuse 10.2Installation of rt61 driveryrt61sta.datifcfg-wlan-id-00:17:9a:b8:59:c1possible problems State of driver in Opensuse 10.2 Opensuse 10.2 is using a driver for this card which is completely unusable. The driver that is installed is called „rt61pci“. This however requires firmware that does not come with Opensuse 10.2, which leads to the following error when loading the module...

Grub installation

Everytime I have to look up how to install grub after the mbr got messed up. Therefor here a link to speed up the process… Manual page of Grub about grub-install The important part is the line mount -t ext2 /dev/hda1 /mnt grub-install --root-directory=/mnt hdamount -t ext2 /dev/hda1 /mnt grub-install --root-directory=/mnt...
Seite 3 von 41234