cd x/y/z command does not work even if I see z with ls command when directory is x/y I cannot set a folder as a directory even if I see it with ls command. What is the problem?

edit: 

maccomp:~ user$ cd documents/code
maccomp:code user$ ls
data 
maccomp:code user$ cd documents/code/data
-bash: cd: documents/code/data: No such file or directory


Why?

second edit: 

maccomp:code user$ cd ~/documents/code 
maccomp:code user$ ls -l
total 0
drwxr-xr-x  27 user  staff  864 Nov  6 23:36 data 
maccomp:code user$ ls -ld data
ls: data: No such file or directory
maccomp:code user$ cd data
-bash: cd: data: No such file or directory


third edit

maccomp:code user$ ls -ldB data\ /
drwxr-xr-x  27 user  staff  864 Nov  6 23:36 data /
maccomp:code user$ ls -lB
total 0
drwxr-xr-x  27 user  staff  864 Nov  6 23:36 data
Your data directory name ends with a space character, so the name is actually "data" (without the "" of course). Unless you really need it like that, it's probably best to rename it by running mv "data " data.

If you can't change the name, use cd "data ", or cd data?, or cd data\ to change into the directory.