当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > 对应DOS与Linux相关的指令

Unix/Linux
vi的命令
如何判断Zend Optimizer安装成功
Linux常用的日志文件和常用命令
linux如何修改主机名
linux如何删除非空文件夹|linux怎么删除非空文件夹
gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpect
vsftpd 配置例子
vsftpd 配置
vsftpd如何配置虚拟用户:PAM + PgSQL + FreeBSD-4
vsftp中文说明
VSFTP配置实例
vsftpd 配置(中)
怎么使用户能访问ftp,但不能远程登录
httpd: Could not determine the servers fully qualified domain name, using 127.0.
测试apache是否安装成功
apache 80端口无法打开|连接
make_sock: could not bind to address 0.0.0.0:443
kernel-headers下载
kernel-headers-2.2.1-4
找不到config.inc.php 没有config.inc.php这个文件

Unix/Linux 中的 对应DOS与Linux相关的指令


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 43 ::
收藏到网摘: n/a


  左边是 DOS 的命令; 右边是 Linux 里具用同样功能的指令.
  COPY: cp
  DEL: rm
  REN: mv
  TYPE: more, less, cat
  
  Redirection and plumbing operators: < > >> |
  Wildcards: * ?
  nul: /dev/null
  prn, lst: /dev/lp0; lpr
  
  - - EXAMPLES -
  
  DOS Linux
  
  C:\GUIDO>copy joe.txt joe.doc $ cp joe.txt joe.doc
  C:\GUIDO>copy *.* total $ cat * > total
  C:\GUIDO>copy fractals.doc prn $ cat fractals.doc | lpr
  C:\GUIDO>del temp $ rm temp
  C:\GUIDO>del *.bak $ rm *~
  C:\GUIDO>ren paper.txt paper.asc $ mv paper.txt paper.asc
  C:\GUIDO>type letter.txt $ more letter.txt
  C:\GUIDO>type letter.txt $ less letter.txt
  C:\GUIDO>type letter.txt > nul $ cat letter.txt >/dev/null
   n/a $ more *.txt *.asc
   n/a $ cat section*.txt
  
  附注:
  
  1) * 在 Linux 中变得聪明多了:
  - - * 表示除了隐藏档外的所有档案; .* 表示所有隐藏档; *.* 就是"某些字元" +
  一个点 + "某些字元" 的档案名称;

  - - p*r 可以满足 peter 和 piper 两个字; picked 和 peck 也都可以表为 *c* ;
  2) 使用 more 这个命令时, 按下<space> 可以继续阅读下一页, 'q' 或 ctrl-c 结束.
  less 和 more 类似, 但可用方向键.
  3) Linux 里 *没有* UNDELETE 这种命令. 所以, 砍掉档案前要三思啊..
  4) 除了 DOS 中的 < > >> 之外, Linux 可以使用 2> 来对错误讯息导向. (stderr)
  5) Linux 有另外一组万用字元: []. 使用:
  - - [abc]* 表示以 a, b, 或是 c 开头的档案;
  - - [I-N]* 表示由 I, J, K, L, M, 或 N 开头的档案;
  6) 没有像 DOS 一样的 rename 可用; 也就是说, ren *.xxx *.yyy 是无效的.