🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ch.comp.os.linux
Article #12429

Re: Pruefen von symbolische links

#12429
From: Christian Strub
Date: Thu, 05 Jul 2001 10:47
42 lines
2705 bytes
> Ugh :) Very hackerish, aber ist eine witzige Idee.
>

wusste ich schon, aber es viel mir gerade nichts mehr ein, wollte es zuerst auch
nicht posten weil eben wie du es schon gesagt hast "very hackerish".

> Also, das mit dem test sollte eigentlich schon funktionieren (Hat
> bei mir bei [Open|Free]BSD, Linux, Solaris, plan9 funktioniert):
>
> zar:/tmp # ls -al foo bar
> ls: foo: No such file or directory
> ls: bar: No such file or directory
> zar:/tmp # ln -s bar foo
> zar:/tmp # ls -al foo bar
> ls: bar: No such file or directory
> lrwxrwxrwx   1 root     root            3 Jul  5 11:33 foo -> bar
> zar:/tmp # test -h foo && echo "file exists" || echo "file non-existant"
> file exists
> zar:/tmp # test -e foo && echo "file exists" || echo "file non-existant"
> file non-existant
> zar:/tmp # > bar
> zar:/tmp # ls -al foo bar
> -rw-r--r--   1 root     root            0 Jul  5 11:33 bar
> lrwxrwxrwx   1 root     root            3 Jul  5 11:33 foo -> bar
> zar:/tmp # test -h foo && echo "file exists" || echo "file non-existant"
> file exists
> zar:/tmp # test -e foo && echo "file exists" || echo "file non-existant"
> file exists
> zar:/tmp #
>
> Was meinst Du dazu? Wenn das nicht reicht, habe ich noch eine hardcore
> Variante, die auch auf allen Systemen funktionieren sollte :)
>

Das test -e lauft hier, auch wenn es nicht in der man-pages, die ich hier habe,
beschrieben ist. (Arggg...)

Das sollte fuer mich genuegen, aber meine Neugier mochte doch wissen wie die
hardcore Variante lautet.

Gruss
Christian
Technical Details
Message-ID: <3B4445DD.CD3BF0E6@siemens.ch>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-ge.switch.ch!news!news.siemens.ch!not-for-mail
References: <3B441847.381424C4@siemens.ch> <3B441A75.2CF14D98@tac.ch> <3B442D76.F78EB891@siemens.ch> <3B44352A.6CC715F9@tac.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII-7-bit
X-Google-Thread: f4b73,67e615da96b01c88
X-Google-Attributes: gidf4b73,public
X-Google-ArrivalTime: 2001-07-05 03:48:12 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-ge.switch.ch!news!news.siemens.ch!not-for-mail
From: Christian Strub <christian.strub@siemens.ch>
Newsgroups: ch.comp.os.linux
Subject: Re: Pruefen von symbolische links
Date: Thu, 05 Jul 2001 12:47:57 +0200
Organization: Siemens Switzerland Ltd
Lines: 44
Message-ID: <3B4445DD.CD3BF0E6@siemens.ch>
References: <3B441847.381424C4@siemens.ch> <3B441A75.2CF14D98@tac.ch> <3B442D76.F78EB891@siemens.ch> <3B44352A.6CC715F9@tac.ch>
NNTP-Posting-Host: myrta.es3.siemens.ch
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: zrha108x.zrh.siemens.ch 994330078 1259 139.24.2.82 (5 Jul 2001 10:47:58 GMT)
X-Complaints-To: support.web@siemens-sbs.ch
NNTP-Posting-Date: Thu, 5 Jul 2001 10:47:58 +0000 (UTC)
X-Mailer: Mozilla 4.72 [en] (X11; U; HP-UX B.10.20 9000/785)
X-Accept-Language: en