]> git.sesse.net Git - backup.sh/blobdiff - finn_ufullstendige.sh
Take backup at lowest possible (non-idle) CPU priority, and idle I/O priority.
[backup.sh] / finn_ufullstendige.sh
index 39892d1c024e29a069848eb12a62cb72a7540d5b..02f5209945431ea3ff238415dcfd938b54f07cdc 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
 
 #Hovedkatalogen
-topdir=/backup
+topdir=$1
 #Utfil
-utfil=/home/backup/public_html/ufullstendige.html
+utfil=$2
 
 dato=`date`
 
@@ -39,14 +39,14 @@ $dato
 EOT
 
 cd $topdir
-for maskin in `ls -1 | grep -v lost+found`
+for maskin in `ls -1d ?* | grep -v lost+found`
 do
  cd $topdir/$maskin
- for del in `ls -1 | grep -v navn`
+ for del in `ls -1d ?* | grep -v .name`
  do
-  delnavn=`cat $topdir/$maskin/$del.navn`
+  delnavn=`cat $topdir/$maskin/$del.name`
   cd $topdir/$maskin/$del
-  for level in `ls -1`
+  for level in `ls -1d ?*`
   do
    cd $topdir/$maskin/$del/$level
    #pwd