Here is an excerpt from Taha Hussein's An Egyptian Childhood with reference to the Nights (one of many references by the author throughout his works, most notably with the 1943 Dreams of Scheherezade).
"So it was in the heart of our friend. He would be a Sufi and practise magic, all the while believing that he was pleasing God and getting our of life the best of its pleasures.
Among the stories brought by the book-pedlars, which were often in the hands of the lads, was one which was an excerpt from The Arabian Nights, and known as the story of Hassan of Basra. This story contained an account of the adventures of a Magician who turned brass into gold, and also an account of that castle which stood behind the mountain on lofty pillars in the air, where-in resided the seven daughters of the Jinn, and whither Hassan of Basra repaired. Then again came the adventures of this man Hassan, telling how he made a long and difficult journey to the abodes of the Jinn. Now among these adventures there was something that filled the lad with admiration, and that was the account of the rod given to this Hassan on one of his journeys, one of the special properties of which was that, if you struck the ground with it, the earth split open and there came forth nine persons to carry out the behests of the possessor of the rod. They were of course Jinn, all-powerful and ethereal, who flew, ran, carried heavy burdens, removed mountains and worked wonders without limit.
The lad was fascinated by this wand, and so greatly desired to get possession of it that he was sleepless at night and perturbed by day. So he began to read books on magic and Sufism and sought among magicians and Sufis for a means of getting hold of it."