Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running QNX Neutrino.

I've got some files in /mountpoint:

# ls /mountpoint

And after mounting my NAS using fs-cifs like so,

# fs-cifs //hostname:hostipaddress:/sharename /mountpoint login password &

I see the remote files (c, d) as well as my local files (a, b)

# ls /mountpoint

  • Is this the expected behaviour? I thought mount usually hid the local files (as per Where do the files go if you mount a drive to a folder that already contains files?)

  • Is there an easy way of determining whether the files listed are stored locally or on the NAS?

  • Is there an easier method of moving local files in /mountpoint to the NAS than unmount, move local files to tmp, remount, move files from tmp to /mountpoint?

share|improve this question
up vote 2 down vote accepted

QNX Neutrino allows and even defaults to union mounts: if you mount two different filesystems on the same location, the files in both are present, except that files in the second filesystem shadow files with the same names in the first filesystem.

This is different from typical unix behavior, where mounting a filesystem shadows everything below the mount point. Many unix variants have some way of performing a union mount nowadays (e.g. UnionFS, or FreeBSD's mount -o union), but it is not a traditional feature.

On normal unix systems, df /path/to/file tells you what filesystem a file is on. I expect it to apply to QNX union mounts as well, but I don't know for sure.

Unless you want to perform a union mount, which you apparently don't, always mount a filesystem to an empty directory.

mkdir /mountpoint2
fs-cifs //hostname:hostipaddress:/sharename /mountpoint2 login password &
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.