I made a simple program which opens a text file and prints "file opened successfully" or "error opening file" depending whether the file was opened or not. I compiled it and copied the executable to /usr/bin so that I could issue commands like open filename.txt without the additional ./ [dot forward slash] before it.

I later deleted that executable from /usr/bin but now every time I type gcc without anything else, instead of saying "No input files" it says "error opening file". If I try to compile some other program like gcc hello.c -o hello, it doesn't compile anything just says "file opened successfully". What do you think is the problem?