[ LUGOS ] Brisanje linka in originane datoteke

Metod Kozelj metod.kozelj at rzs-hm.si
Thu Jul 5 15:32:36 CEST 2001


Howdy!

On Thu, 5 Jul 2001, David Ipavec wrote:

> V eni skripti brisem datoteke, ce je datoteka pobrisem datoteko,
> ce je pa link (ln -s) pobrisem link in originalno datoteko.

Torej imas v skripti nekaj takega:

FILES="...."
for F in ${FILES}; do
    if [ -L ${F} ]; then
        G=`ls -l ${F} | grep ^l | awk '{ print 11 }'`
	if [ -f ${G} ]; then
	    rm -f ${G}
        fi
	rm -f ${F}
    fi
done


Peace!
  Mkx

---- perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'




More information about the lugos-list mailing list