十个你可能不曾用过的Linux命令
中国IT站 www.chinaitz.com 2009-5-14

  文件合并只需要使用简单的合并就行了,如:

1.[hchen@RHELSVR5]#  cat LF_* >largefile.tar.gz

  5)nl

  nl命令其它和cat命令很像,只不过它会打上行号。如下所示:

01.[hchen@RHELSVR5 include]# nl stdio.h | head -n 10
02.     1  /* Define ISO C stdio on top of C++ iostreams.
03.     2     Copyright (C) 1991,1994-2004,2005,2006 Free Software Foundation, Inc.
04.     3     This file is part of the GNU C Library. 
05. 
06.     4     The GNU C Library is free software; you can redistribute it and/or
07.     5     modify it under the terms of the GNU Lesser General Public
08.     6     License as published by the Free Software Foundation; either
09.     7     version 2.1 of the License, or (at your option) any later version.
10. 
11.     8     The GNU C Library is distributed in the hope that it will be useful,

  6)mkfifo

  熟悉Unix的人都应该知道这个是一个创建有名管道的系统调用或命令。平时,我们在命令行上使用竖线“|”把命令串起来是使用无命管道。而我们使用mkfifo则使用的是有名管道。下面是示例:

  下面是创建一个有名管道:

1.[hchen@RHELSVR5 ~]# mkfifo /tmp/hchenpipe
2. 
3.[hchen@RHELSVR5 ~]# ls -l /tmp
4.prw-rw-r-- 1 hchen  hchen  0 05-10 18:58 hchenpipe

共5篇上一页 1 2 3 4 5 下一页
上一篇:VPS使用手记-Linux命令行基础
下一篇:没有比当前更新的主题
责任编辑:admin本文仅代表作者观点,与中国IT站立场无关。
收藏】 【推荐】 【投稿】 【 】 【打印】 【关闭
评论加载中...