This question already has an answer here:
The story opens with the protagonist (human male, can't remember the name) en route to the starport on a remote, sparsely-populated world. He's currently on foot, as his vehicle broke down sometime earlier in the journey.
The central idea of the plot as the story unfolds is whether or not there is some sort of deadly alien beast waiting out there in the darkness. Early on, the protagonist recalls the tale he heard in the local bar from a fellow he knew.
This other man claimed to have seen some horrible creature, and to have narrowly escaped said creature. He described the sound the creature made in the darkness. I can't remember exactly how it was described, but I do remember it was compared to something familiar (i.e., "it was like the sound of X"), and I think it referred to a scraping sound made by the alien's claws or tusks. The man then claimed that the only thing that saved him was his flashlight. The creature apparently fears light.
As the story progresses, the protagonist struggles to keep his fears in check. He knows the other man is know for telling wild stories, but can't quite dismiss the idea out of hand. The tension increases as his flashlight gives out, and he must continue the journey in total darkness.
The story ends with a somewhat predictable twist. The man is in visual sight of the starport and can hear the comforting sounds of the machinery and routine activity of the starport off in the distance. It is at that moment he also hears the telltale scraping sound of the creature. The end being, just a few hundred meters short of safety, the alien beast turns out to be real, and has found him.
I read this one in an anthology either in the late 1970s or (more likely) early 1980s. The feel of the story is such that it could be a much older offering, though I can't be for certain.