Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Should -f test return true for symlinks ? [RESOLVED]

by MidLifeXis (Monsignor)
on Oct 23, 2013 at 17:28 UTC ( #1059328=note: print w/replies, xml ) Need Help??


in reply to Should -f test return true for symlinks ? [RESOLVED]

(comment on OP's followup question in the UPDATE): The point of the -follow option on find is to allow you to follow a symlink when traversing directories. The default is off*. find $DIR -follow | xargs $something_destructive would be a bad thing to have run, as it could escape from $DIR.

* I saw an instance of this in a previous life when a root cleanup job included -follow, and there was a symlink into a networked file system. Cleaned up the entire shared file system. :-/

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Should -f test return true for symlinks ? [RESOLVED]
by vsespb (Chaplain) on Oct 23, 2013 at 19:23 UTC
    also, with "-follow" implementation needs to track all visited directories, to avoid cyclic links, and thus use more memory.
Re^2: Should -f test return true for symlinks ? [RESOLVED]
by Bloodnok (Vicar) on Oct 23, 2013 at 17:52 UTC
    TFT MidLifeXis, never even considered that ... as you can tell :-)

    A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1059328]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2020-11-30 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?