Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
zh:docs:guide-user:base-system:user.beginner.cli [2019/11/01 14:44] – [editing files] longgenxingzh:docs:guide-user:base-system:user.beginner.cli [2020/11/10 09:23] xiu
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// 
- 
 ====== Command-line interpreter ====== ====== Command-line interpreter ======
 ====== 使用命令行工具 ====== ====== 使用命令行工具 ======
Line 121: Line 119:
   * ''vi'' starts out in command mode   * ''vi'' starts out in command mode
  
-**中文翻译**:标的文本编辑器是''[[wp>vi]]''。除非你用的很熟了,否则你会发现vi这个软件不好学,也不那么完美。+**中文翻译**:标的文本编辑器是''[[wp>vi]]''。除非你用的很熟了,否则你会发现vi这个软件不好学,也不那么完美。
   * vi编辑器有两种模式:命令行模式 和 插入编辑模式   * vi编辑器有两种模式:命令行模式 和 插入编辑模式
   * 先按下ESC键进入到命令行模式   * 先按下ESC键进入到命令行模式
Line 137: Line 135:
 In order to edit the file, you have to be in //insert mode//. Press [i] or [a]. In order to edit the file, you have to be in //insert mode//. Press [i] or [a].
  
-**中文翻译**:要编辑一个我呢见,你就要进入插入编辑模式。按i或者a键进入该模式。+**中文翻译**:要编辑一个文件,你就要进入插入编辑模式。按i或者a键进入该模式。
  
 === exiting vi === === exiting vi ===
Line 184: Line 182:
   * 你安装好vim之后得重启设备才能让它正常工作。   * 你安装好vim之后得重启设备才能让它正常工作。
 ===== Scripting language ===== ===== Scripting language =====
 +===== 脚本语言 =====
 OpenWrt uses [[https://www.busybox.net/BusyBox.html | busybox's]] ash shell by default, which is in most parts //[[wp>POSIX]]// conform. Visit //[[wp>shell script]]// for general Information about shell scripts. OpenWrt uses [[https://www.busybox.net/BusyBox.html | busybox's]] ash shell by default, which is in most parts //[[wp>POSIX]]// conform. Visit //[[wp>shell script]]// for general Information about shell scripts.
  
 +**中文翻译**:OpenWrt默认使用 [[https://www.busybox.net/BusyBox.html | busybox's]]ash命令行控制台软件,这个软件比较符合 //[[wp>POSIX]]// 规则。访问//[[wp>shell script]]//了解一般的控制台脚本的信息。
 ===== Executing shell scripts ===== ===== Executing shell scripts =====
 +===== 执行命令行控制台脚本文件 =====
 Shell scripts can be executed with: Shell scripts can be executed with:
 +
 +**中文翻译**:控制台脚本可以像下面这么执行:
  
 ''sh /path/to/script.sh'' ''sh /path/to/script.sh''
Line 193: Line 196:
 After changing the executable bit its also possible to run it without the sh in front: After changing the executable bit its also possible to run it without the sh in front:
  
 +**中文翻译**:如果修改了文件属性里的执行位,也可以达到不加sh就能执行的目的:
 +  *为文件添加可直接执行的属性
 <code> <code>
 chmod +x /path/to/script.sh chmod +x /path/to/script.sh
 +</code>
 +
 +  *直接访问并执行文件
 +<code>
 /path/to/script.sh /path/to/script.sh
 </code> </code>
Line 200: Line 209:
  
 ===== File Managers ===== ===== File Managers =====
 +===== 文件管理器 =====
 You may also want to try ''[[wp>Midnight Commander|mc]]'' or ''[[wp>Demos Commander|deco]]''. You may also want to try ''[[wp>Midnight Commander|mc]]'' or ''[[wp>Demos Commander|deco]]''.
 +
 +**中文翻译**:你可以使用[[wp>Midnight Commander|mc]]命令,或者[[wp>Demos Commander|deco]]命令来管理文件。(译者注:这两个软件都需要单独安装,另外mc对中文比较友好)
  
  
Line 208: Line 220:
  
 ===== Further Help ===== ===== Further Help =====
 +===== 更多帮助信息 =====
   * [[https://wiki.debian.org/CommandLineInterface]]   * [[https://wiki.debian.org/CommandLineInterface]]
   * [[http://linuxcommand.org/tlcl.php]] ---- William Shotts free pdf books starting from terminal basics   * [[http://linuxcommand.org/tlcl.php]] ---- William Shotts free pdf books starting from terminal basics
  
 +===== 翻译信息 =====
 +LongGenxing  20191101 第一次翻译
 +xiu          20201110 修正了两处错别字
  • Last modified: 2021/01/29 12:19
  • by lujimmy