0

I have a log directory with thousands of files that are named similar to this:

''$'\351\243\216\346\211\207\343\200\201\347\273\204\345\220\210'' strutstore A'$'\350\241\250''.xlsx'

I want to delete any file that has a single quote in its name. I can't figure out how to match them. When I try:

ls ''*

I get:

ls: unrecognized option '----------------z-2020-02-12 ZTL-Y-.xlsx'
RubyRedGrapefruit
  • 501
  • 3
  • 6
  • 17

1 Answers1

1

If you're trying to pass filename arguments that begin with a hyphen, you should use a double hyphen to terminate your own command options, for example:

ls -- ''*
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972