Here's a POSIX way of deleting all broken symbolic links in the current directory, without recursion. It works by telling find
to traverse symbolic links (-L
), but stopping (-prune
) at every directory-or-symbolic-link-to-such.
find -L . -name . -o -type d -prune -o -type l -exec rm {} +
You can also use a shell loop. The test -L
matches symbolic links, and -e
matches existing files (excluding broken symlinks).
for x in * .[!.]* ..?*; do if [ -L "$x" ] && ! [ -e "$x" ]; then rm -- "$x"; fi; done
If you want to recurse into subdirectories, this technique doesn't work. With GNU find (as found on non-embedded Linux and Cygwin), you can use the -xtype
predicate to detect broken symbolic links (-xtype
uses the type of the target for symbolic links, and reports l
for broken links).
find -xtype l -delete
POSIXly, you need to combine two tools. You can use find -type l -exec …
to invoke a command on each symbolic link, and [ -e "$x" ]
to test whether that link is non-broken.
find . -type l -exec sh -c 'for x; do [ -e "$x" ] || rm "$x"; done' _ {} +
The simplest solution is to use zsh. To delete all broken symbolic links in the current directory:
rm -- *(-@D)
The characters in parentheses are glob qualifiers: -
to dereference symlinks, @
to match only symlinks (the combination -@
means broken symlinks only), and D
to match dot files. To recurse into subdirectories, make that:
rm -- **/*(-@D)
There are a couple of things not quite right in your code.
For the geom_point
you only want the x
and y
in your aes
. The other arguments
should be outside, giving
geom_point(data = df, aes(x = Longitude, y = Latitude),
fill = "green", alpha =0.8, size = 5, shape = 21)
Also the label
for the geom_text
should be inside aes
. However,
as there is no data
, x
or y
at a higher level, then geom_text
will not find the label variable or the positions of where to place the labels. So you also need to include these in the call
geom_text(data=df, aes(x = Longitude, y = Latitude, label=Station.Area))
However, you can omit some of this repetition by using the base_layer
argument
of ggmap
:
ggmap(dub_map,
base_layer = ggplot(data=df, aes(x = Longitude,
y = Latitude,
label=Station.Area))) +
geom_point(fill = "green", alpha =0.8, size = 5, shape = 21) +
geom_text()
Best Answer
You've marked your block as an output block. When the view is rendered via
renderView()
in the controller action, your block is both a child of a block which echoes its children (content is acore/text_list
block), as well as being an output block which will be rendered in its own right.Remove the
output="toHtml"
bit and you will have what you need. By the way, you could / should move this change from a custom page.xml and into a local.xml file in your layout - it need only be inside a<page_two_columns_left />
layout update handle.