#!/bin/sh # Addindex # v1.0 - Apr 12 1995 # # add new files to 00index.txt ( only -type f [file] ) # # _nykyisessa_ hakemistossa olevat 600/660 tiedostot == uudet.. # find . -type f \( -perm 600 -o -perm 660 \) -print -o ! -name . -type d -prune\ | cut -c3- > /tmp/00files cp 00index.txt /tmp/00new emacs /tmp/00new $1 sort /tmp/00new > /tmp/00tmp mv /tmp/00tmp 00index.txt chmod 664 00index.txt cat /tmp/00files | xargs chmod 664 rm *~ # dirs have gotten too large for these 2 commands: do it manually #cat 00index.txt #ls -lag rm /tmp/00*