chmod: cannot access ‘x’: No such file or directory

Question:

I was trying to follow this tutorial https://www.youtube.com/watch?v=fmqkncV6JIY. Basically I want to use shebang in my python code. I’m trying to run commands on AWS Linux instance. I got error while running

chmod + x ​ file.py

The error I got

chmod: cannot access ‘x’: No such file or directory

Asked By: Ayesha Khan

||

Answers:

Remove the space between + and x:

chmod +x ​file.py
Answered By: MrBens
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.