'ls'可以显示文件名,例如
ls config.inc.php
config.inc.php
Run Code Online (Sandbox Code Playgroud)
'pwd'显示当前文件夹的完整路径,例如
pwd
/Application/XAMPP/xamppfiles/phpmyadmin
Run Code Online (Sandbox Code Playgroud)
有没有一个命令可以把它们放在一起,就能显示:
/Application/XAMPP/xamppfiles/phpmyadmin/config.inc.php
Run Code Online (Sandbox Code Playgroud) 我只想将文件夹树复制到另一个地方,如下所示:
cp -avr /blah/blah/htdocs ./
Run Code Online (Sandbox Code Playgroud)
但我有错误:
cp: the -R and -r options may not be specified together.
Run Code Online (Sandbox Code Playgroud)
我遵循了本教程:http : //www.cyberciti.biz/faq/copy-folder-linux-command-line/ 这是关于 Linux,而我使用的是 Mac。我发现我可以通过使用 -avR 来解决。但是,我想知道为什么 -avr 会导致 Mac 上出现奇怪的错误。