如何导航到终端(mac)中的其他目录? [英] How to navigate to to different directories in the terminal (mac)?

查看:202
本文介绍了如何导航到终端(mac)中的其他目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了sass,现在尝试访问sass文件.例如:

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?

我的mac版本是10.6.8

My mac version is 10.6.8

推荐答案

要检查您尝试打开的文件是否确实存在,可以使用cd在终端中更改目录.要更改为~/Desktop/sass/css:cd ~/Desktop/sass/css.要查看目录中有哪些文件:ls.

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.

如果需要有关这两个命令的信息,请使用man页:例如,man cdman ls.

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

Google搜索基本的unix命令行命令"或类似的内容;这将为您提供许多在命令行中移动,查看文件等的示例.

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.

在Mac OS X上,您也可以使用open打开查找器窗口:open .将在查找器中打开当前目录. (open ~/Desktop/sass/css将打开~/Desktop/sass/css).

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).

这篇关于如何导航到终端(mac)中的其他目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆