How long you have to be in us to file for citizenship?

No less than 5 years.

Please read the United States government site to find out about citizenship.