-2

Whats different "name.txt" vs "name.txt " in Linux?

If I rename name.bin to name.txt - is normal and file doesn't executable.

If I rename name.bin to file.txt (with space after filename) - file will be executable.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

1 Answers1

2

Whether the file is executable (or not) is a matter of permissions, not of the name.

Use chmod a+x to make it executable and chmod a-x to disallow it. Full details here:

https://unix.stackexchange.com/a/297014/255708

Frenzie
  • 106