'File is listed in directory, but cannot be found by programs or bash commands
I am running MATLAB code that requires files to be loaded in to the program. I am getting a "File not found" error for certain files, but not others, although they are all listed in the directory. If I run ls -l /data, the output is
-rw-rw-r-- 1 jolien jolien 63899420 Mar 17 15:34 EC_sub-043_ses-bhb_task-rest-run-1.fdt
-rw-rw-r-- 1 jolien jolien 2028360 Mar 17 15:35 EC_sub-043_ses-bhb_task-rest-run-1.set
-rw-rw-r-- 1 jolien jolien 63899680 Mar 9 13:49 EC_sub-044_ses-bhb_task-rest_run-1.fdt
-rw-rw-r-- 1 jolien jolien 2028376 Mar 9 13:49 EC_sub-044_ses-bhb_task-rest_run-1.set
I use bash test to see if the problem file exists (the command I am using is test -e /data/EC_sub-043_ses-bhb_task-rest_run-1.set && echo exists || echo does not exist), the output is does not exist.
However, if I run the same command for the other file (test -e /data/EC_sub-044_ses-bhb_task-rest_run-1.set && echo exists || echo does not exist), the output is exists.
Does anyone know what is going on here? Clearly the file is listed in the directory, but the filesystem (and therefore my MATLAB program) does not see it. It may be worth noting that when I try to load in the file using the MATLAB program's GUI, rather than the terminal, it works.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
