Home
Posted By: Bob_00001 Navigating directories in Terminal - 01/09/16 03:17 AM
I use several different applications that were developed for generic Unix, and open up with the default directory set to something like usr/bin/

I need to access files that are in my documents folder. Usually, I'm able to find my way to the documents folder, but this time I'm stymied.
I've just installed the latest release of Octave, and it comes up with a Windows Explorer kind of directory listing on the left side of the window. For the life of me, I can't navigate from the current directory to documents.

What I see is:

Parent directory: /

Directories in list:
bin
boot
dev
etc
home
lib
lib64
lost+found
media
mnt
opt
proc
root
run
sbin
srv
syus
tmp
usr
vagrant
var

Posted By: Bob_00001 Re: Navigating directories in Terminal - 01/09/16 12:04 PM
I figured it out. I just created a file with a unique name from the software, and then searched for it with Findfile. Turns out that the directory is the same folder in which the application resides. Oddly, it doesn't appear possible to go higher up the directory hierarchy from within the software. Maybe this is OSX sandboxing at work?
Posted By: Virtual1 Re: Navigating directories in Terminal - 01/11/16 01:23 PM
there's a lot to learn about terminal, but here are a few tips that will help your specific issue:

1) with a terminal window open, you can drag and drop both files and folders from Finder into the window (anywhere, it doesn't need to be by the cursor or even on the same line) for Finder to automatically enter the full path for you. You can use this to go to a folder using "cd" by typing "cd" and a space, drag and dropping the folder to go to, and hitting [return], or you can view a text file the same way using "cat". So if you can find the folder in Finder, you can drop it into terminal to CD to it or do other operations with it as needed.

2) once you are in a folder, you can hit [tab] to auto complete a path you've partially entered. If there is no match or you are at the end of a filename, you'll get a beep. If there's one entry, it will fully complete the path. If there are several possible completions, it will list them immediately if the list is short. If the list is long, it will prompt you to see if you really want to "show all 215 possibilities?" etc.

The content of the folder list you show looks similar to the root directory (/) but is missing things like System and Applications, and shouldn't have root in it, so I don't know exactly what you've got there.
© FineTunedMac