I am executing the following command (to find all files with .ts
extension and deleting them):
find . -type f -name "*.ts" –delete
An error shows up:
find: paths must precede expression: `–delete'
What have I done wrong?
command linedeletefind
I am executing the following command (to find all files with .ts
extension and deleting them):
find . -type f -name "*.ts" –delete
An error shows up:
find: paths must precede expression: `–delete'
What have I done wrong?
Best Answer
You have typographic sign
–
instead of minus (-
).Change your command to
For complete syntax see
man find
:Be careful with copying and pasting commands from blogs and rich text processors. They may transform some typographic symbols to their plain text equivalents and vice versa.
Consider to use simple text editors for the notes next time - use plain text, Markdown or reStructuredText.
And as @AuxTaco mentioned - some blogs may rely on your copying to attack your computer.