Documents saved from Pages show you the Pages extension (.pages) in the save panel and afterward in the Finder. If for some reason, a Pages document appears in the Finder without the extension showing, that is easily fixed by single-clicking on the Pages document and then pressing option+cmd+i to open an Info panel where you can deselect Hide Extension.
There should never be a reason to touch a Pages document in the Terminal as you have described.
Apple now supports the Zsh Shell in the Terminal and that is the message telling you it is now Apple's default shell — if you choose to make it so with some additional effort. If you are an infrequent Terminal user, then you can ignore the Terminal message.