Chinaunix首页 | 论坛 | 博客
  • 博客访问: 365030
  • 博文数量: 83
  • 博客积分: 2213
  • 博客等级: 大尉
  • 技术积分: 835
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-16 20:26
文章分类

全部博文(83)

文章存档

2015年(1)

2012年(1)

2011年(14)

2007年(20)

2006年(47)

我的朋友

分类: LINUX

2006-03-22 18:11:35

文件和目录操作的基本
命令有:cat、chgrp、xgnod、c
hown、clear、cmp、cp、cut、
  diff、 du、emacs、 f
mkdir、 mikdir、 more、
grep、 file、 fmc、 grep、 h

ead、 ln、 less、 locate、 ls、

  mv、 pico、 pwd、 rm
、 whatis、 whereis
、 sort、 stat、 strings、 t

ail、 touchy umask、 umq、 vi、 wc

  和which等。这些命令是在文本模式下最常用的命令。                              
  1. cat                                                                      
  cat(concatenate)命令可以显示文件的内
一个文件。例如
容(经常和more区搭配使用),或是将多个文件合并成

  [root@redhat9 rootj]#cat smd.conf | more  
  2. chgrp                                                                  
  用来改变文件或目录所属的用户组。命令
名支持通配符,如果用户不是该文件的所有者
的参数是以空格分开的要改变属组的文件列表,文件
,则不能改变该文件的所属组。
  3. chmod                                                                  
  chmod命令用于改变文
。另一种是使用图形化
件或目录的访问权限。该命令有

两种用法的方法,另一种是数字设置法

  4. chown                                                                  
  chowm命令将指定用户或组件为特定文件
是组名或组ID。特定的文件是以空格分开的可
的所有者。用户可以设置为用户名或用户ID,组可以
以改变权限的文件列表,文件名支持统配符。
  5. clear                                                                  
  cler命令用来清除终端屏幕                                                      
  6.cmp                                                                        
  cmp命令用来比较两个文件的大小。                                                
  7. cp                                                                        
  cp(copy)命令可以将文
,在使用cp命令时,只需要指
8.cut                                                                        
  cut命令是用来移除文件中的部分内容.                                            
  9. diff                                                                    
  diff命令是用来找出两个文伴之间的不同之处。                                    
  10. du                                                                      
  du如命令用来测试磁盘的剩余空间大小。                                            
  11. emacs                                                                
  emacs命令用来显示GNU工程的宏。                                            
  12.fgreb,grep,egrep                                            
  grep,egrep,fgrep命令
必要的信息。grep命令每次
命令可以检索固定字符串,
可以搜寻并显示特定字符串,一
只能搜索每次指定的模式;egrep
但不识别正则表达式,可作为快
般用来过滤显示结果,避免显示太多不
命令可以检索扩展的正则表达式;fgrep
速搜索命令。
  [root@redhat9 etc]# grep text *.conf          
  htdig.conf:# text fr
om each document (this exclu
des any HTML markup...) If you
  plan on                                                                    
  htdig.conf:# search words aren't fou
shows
nd in context in the stored excerpt, htsearch

  htdig.conf:# the text defined in the
no_excerpt_text attribute:
  htdig.conf:# The fol
lowing are used to change th
e text for the page index.
  htdig.conf:# The def
aults are just boring text n
umbers. These images spice
  htdig.conf:next_jpage_text:

  width-"30" height-"30
" alt=next">
  13. file                                                                  
  file命令可以用来显示文件的类型。例如                                          
  [root@redhat9 apache]# file *                        
  apache8.jpg: JPEG im
with The GIMP??", 7
age data, JFIF standard 1.01
2 x
, resolution (DPI), "Created

  72                                                                              
管理员在2009年8月13日编辑了该文章文章。 -->
阅读(1776) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~