dysproh
By:
dysproh

Bash throwing error when I try to run file

November 4, 2017 119 views
Applications Ubuntu 16.04

I was trying to run a file in my home directory called millibyted, but whenever I run ./millibyted, it says
-bash: ./millibyted: No such file or directory

Now, I am absolutely certain that the file is there; I have sftp'd in and everything, but it just keeps throwing that error. This doesn't happen on my personal PC, also on Ubuntu 16.04. What do I do?

2 comments
  • Hello,

    Could you try giving the file execute permissions first?

    chmod +x millibyted
    

    I think this should resolve the issue. If it doesn't, maybe you need to make it a shell file.

    mv millibyted millibyted.sh
    rm -f millibyted
    

    Hope it helps, thanks.

  • I has already tried giving exec permissions, and it didn't work. I just tried running it as a shell script and that just threw an error.

1 Answer

Is the Ubuntu 16.04 droplet you're running the 32-bit image or the 64-bit one?

Could be this:

https://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists

Have another answer? Share your knowledge.