2

I entered this code on my octave GUI on Mac:

>>cd file:///Users/Sudipta/Downloads/Stanford/warmUpExercise.m 
error: file:///Users/Sudipta/Downloads/Stanford/warmUpExercise.m: No such file or directory

I am using macOS Big Sur and Octave version 3.8.0.The file in question exists in my computer and I have checked this code multiple times.

It is not able to locate the file on my MacBook for some reason. Can someone help?

Edit: I have tried a new code as mentioned in the comments, but it also can't find the file

>> cd Users/Sudipta/Downloads/Stanford/warmUpExercise.m
error: Users/Sudipta/Downloads/Stanford/warmUpExercise.m: No such file or directory

I have also tried:

1.>> cd Users/Sudipta/Downloads
error: Users/Sudipta/Downloads No such file or directory
2.>> cd Users/Sudipta/Downloads/Stanford
error: Users/Sudipta/Downloads/Stanford No such file or directory

And I got the same error as above.

The other code gave a different error:

3.> cd /Users/Sudipta/Downloads
warning: load_path: .: Operation not permitted
QKqueueFileSystemWatcherEngine::addPaths: open: Operation not permitted
Warning: QFileSystemWatcher: failed to add paths: /Users/Sudipta/Downloads
Tatai
  • 153
  • 7
  • Try removing the `file://` part. `cd` requires a directory name, not a URI. Also, try removing the file name name, `cd` requires a directory name, not a file name. – Cris Luengo Nov 02 '21 at 13:17
  • @CrisLuengo, I tried what you suggested but it's not working – Tatai Nov 02 '21 at 13:26
  • 1
    You need to keep a forward slash at the start of the path. In `file:///Users`, two slashes belong to `file://`, the protocol specifier, and one slash belongs to the path. Do `cd /Users/Sudipta/Downloads`. – Cris Luengo Nov 02 '21 at 13:33
  • @CrisLuengo, on trying the code > cd /Users/Sudipta/Downloads, it is showing operation not permitted. I have also made another edit to the question – Tatai Nov 02 '21 at 13:55
  • 1
    That’s a warning, not an error, and I have no idea why you get that. I suspect Octave did change the current directory, but then is not able to change some internal variable or setting. I suggest you submit a bug report to the Octave project. – Cris Luengo Nov 02 '21 at 14:42
  • The warning is from Octave's Qt integration which uses Qt to subscribe to filesystem change notifications so Octave knows to reload function and class definitions when a file changes on disk due to a different process modifying it. You can ignore this warning if you're not editing your M-code files with an external editor or file sync tool or whatever. The `cd` succeeded; it's just not able to register for push-based notifications of changes to files in that directory. You can use `pwd` to verify it. – Andrew Janke Dec 11 '21 at 09:43

0 Answers0