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.
-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 before rx.
  • You need to add + sign before %T to ensure it recognized by date.
  • With all command fail, meaning you have not add content to file named midate on /tmp, that's why bash refuse to execute. As it was not valid script.
6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest