linux basic command

来源:互联网 发布:python 汉字转unicode 编辑:程序博客网 时间:2024/06/09 13:58
1 pwd,ls,cd
  pwd for "find out current directory"
  ls for listing directory contents
  cd ../
  cd - last one
  cd ~ default one <=>cd
2 man cmd
  an interface to the on-line reference manuals
3 ctrl shift +  zoom out
  ctrl -        zoom in
  ctrl l  clear all
  ctrl u  clear a line cmd
4 touch establish a file at current diretory
  rm file : remove file
  rm -rf a(when "a" is not a empty diretory)


  mkdir establish a diretory at current diretory
  rmdir :remove the null diretory
  mkdir -p a/b/c
  * for any charater
5 cp copy
  mv move
6 cat: print contents
  gedit
  ed: object filename  start with charater "a",end by "."
      w   object filename  (save),q for quit
  nano:
  tac :revert
  head:n line at begin
  tail:n line at end
  shift+pageup/pagedown
  more: space for pageup
  less:ctrl+e,ctrl y
7 how to compress files
  tar -cvf ab.tar a b
  tar -tvf ab.tar a
  gzip/bzip2(derize from uniux)=tar -z/jcvf


  tar -zxvf umcompress .tar.gz
  tar -jxvf umcompress  all.tar.bz2
  gunzip,bunzip2
8 where the file?
  which,whereis,locate,find
  whereis bin,source,
  locate db(fast),if not update database,then use "sudo updatedb"cmd
  find disk
 
 

 



 
 
 

0 0
原创粉丝点击