Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to navigate to to different directories in the terminal (mac)?

Tags:

I have just installed sass and I am now tryring to access the sass file. For example:

sass --watch ~/Desktop/sass/css/style.css:style.css 

and the error is "no such file or directory" - So how can I do this?

My mac version is 10.6.8

like image 873
aurel Avatar asked Mar 03 '12 16:03

aurel


People also ask

How do I navigate to a directory in Mac terminal?

To navigate from one directory or folder to another, you can use the "cd" command, which is short for "change directory." To return to the previous folder, you can use a special option in "cd" to do so.

How do you go to a different directory in terminal?

cd or change directoryThe cd command allows you to move between directories. The cd command takes an argument, usually the name of the folder you want to move to, so the full command is cd your-directory . Now that we moved to your Desktop, you can type ls again, then cd into it.


1 Answers

To check that the file you're trying to open actually exists, you can change directories in terminal using cd. To change to ~/Desktop/sass/css: cd ~/Desktop/sass/css. To see what files are in the directory: ls.

If you want information about either of those commands, use the man page: man cd or man ls, for example.

Google for "basic unix command line commands" or similar; that will give you numerous examples of moving around, viewing files, etc in the command line.

On Mac OS X, you can also use open to open a finder window: open . will open the current directory in finder. (open ~/Desktop/sass/css will open the ~/Desktop/sass/css).

like image 159
simont Avatar answered Sep 21 '22 20:09

simont