Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

sed???

Empfohlene Antworten

Veröffentlicht

Hi @ all,

hab ein kleines Problem mit nem Skript. Es gibt immer nur den 01.10.2002 als zu sicherndes Archiv an. Stimmt da irgendwas nicht mit der Zeile (timestamp="$desti`date ......) ? Hoffe mir kann jemand weiterhelfen. Will die Tar Archive täglich sichern. Kenne mich mit dem sed nicht sonderrlich aus. :-(

Gruß

Martin

#!/bin/bash

mount -t smbfs -o username=lalala,passwd=dummdidumm //server/amt /mnt/server

source="/var/www/html/planer/"

desti="/mnt/server/planer/backup/"

mountdir="/mnt/server/"

if [ -d $mountdir ]

then

echo "Mountverzeichnis existiert bereits..."

else

echo "Erstelle neues Mountverzeichnis..."

mkdir /mnt/server

fi

if [ -d $desti ]

then

echo "Backupverzeichnis existiert bereits..."

else

echo "Erstelle neues Zielverzeichnist $desti"

mkdir $desti

fi

if [ -a $source ]

then

echo "Daten werden umbenannt..."

else

echo "Keine Daten im Verzeichnis"

exit 1

fi

timestamp="$desti`date +%D -r $source | sed -e 's#/#-#g'`"

cp -r $source $timestamp"-planer"

tar -cvf $timestamp"-planer".tar $timestamp"-planer"

rm -rf "$timestamp"-planer

clear

#echo "Aktualisierungen befinden sich im /home/fandelm/planer/ Verzeichnis in changes.txt!!!"

#echo "Planer gesichert!!!" | mail -s "planerskript@proxy" lalala@email.de

sleep 5

umount $mountdir

Hi ;)

ja der datumteil ist von dir :-) Wie gesagt kenne mich net so doll damit aus. Deswegen hatte ich ja auch nachgefragt im Forum... Also liegts an dem date -r?

Danke!!!

Gruß Martin

hat geklappt :-)

Danke nochmals..

Gruß

Martin

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.