Ubuntu: Why `sudo chmod –R u-w .` does not recognices -R as an option when using dot=current dir? [closed]



Question:

Typing

tute@my-server:/opt/npm/capa$ sudo chmod â€"R u-w .  chmod: invalid mode: ‘â€"R’  Try 'chmod --help' for more information.  

Why when I use the current dir '.' -R does not works?


Solution:1

It appears the text processor in question “helpfully” converted the simple dash (U+002D, hypen-minus) to an em dash (U+2013).

Many text processors have a few features that are nice for the type setting of natural language texts but a nuisance when writing formal language texts, vulgo “code”. If you want to type code (incl. terminal commands) into a text editor I suggest you use a plain text editor like Gedit1/Pluma2, Mousepad7, Leafpad3, or Kate4 for a graphical user interface or Nano5, Joe, or Vim6 for a terminal interface.


1 default in Unity (Ubuntu “vanilla”) and GNOME (Ubuntu Gnome) desktops

2 fork of Gedit, default in MATE desktop (Ubuntu MATE)

3 default in LXDE desktop (Lubuntu)

4 default in KDE desktop (Kubuntu)

5 default in all Ubuntu editions

6 Vim “tiny” (a. k. a. vi) is default in Ubuntu “vanilla” Desktop and Ubuntu Server

7 default in Xfce desktop (Xubuntu)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »