In Unix all disks are exposed as paths in the main filesystem, so os.walk('/')
would traverse, for example, /media/cdrom
as well as the primary hard disk, and that is undesirable for some applications.
How do I get an os.walk
that stays on a single device?
Related: