On Sat, 2 Mar 2013, David Tilbrook wrote:

Wjy are we syill having this conversation?
The problem (and its solution) have been
raised for at least 39 years.

To specify a file, directory, device, whatever,
whose leaf name begins with a `-', name it using
a leading `./' as in:

     whatever ./-S

That will work for all programs, even those that
do not support -- to terminate flags.

Furthermore it will support glob patterns.

Now was that so difficult?

-- dt

Also find <dir> -type [df] -name "string" | xargs command

find is pretty good about finding names with special characters and they get passed though xargs ok. This does not work with names with spaces of course. Also pretty easy to test at each step to make sure you are doing want you intend.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to