Chmod Rx Invalid
Jaime@Opticaomegaplus: ~$ Echo 'Date %T' >/Tmp/Midate; Chmod Rx /Tmp/Midate; /Tmp/Midate Chmod: Invalid Mode: ‘Rx’ Try 'Chmod --Help' for More Information...
jaime@OpticaOmegaPlus:~$ echo 'date %T' >/tmp/midate; chmod rx /tmp/midate; /tmp/midate
chmod: invalid mode: ‘rx’
Try 'chmod --help' for more information.
-bash: /tmp/midate: Permission denied
Could someone tell me why it does not work
1 Answer
You're doing it wrong.
$ echo 'date +%T' >> /tmp/Temp_date && chmod +rx /tmp/Temp_date && /tmp/Temp_date
08:32:18
- You need to add
+sign beforerx. - You need to add
+sign before%Tto ensure it recognized bydate. - With all command fail, meaning you have not add content to file named
midateon/tmp, that's why bash refuse to execute. As it was not valid script.