[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Bash (or whatever) question



John Mills wrote:
> ALErs -
> 
> Should be simple, but I don't see it:
> 
> I have a directory with softlinks to a number of files that no longer 
> exist, along with links to files that _do_ exist.
> 
> How can I selectively list those links which are _not_ satisfied, so I can 
> remove them at one go, while ignoring those for which the linked files 
> still exist?

rm $(for fn in *; do
test -f $fn || echo $fn
done)

-- 
Until later, Geoffrey