linux

来源:互联网 发布:手机音频编辑软件 编辑:程序博客网 时间:2024/06/14 08:32

1.get help
  man yourCommand

2.access to dir
  cd dirName

3.get current dir
  pwd

4.create dir
  mkdir dirName

5.create file
  touch fileName

6.show dir content
  ls           #show current dir content
  ls -l        #show detail information 
  ls dirName

7.show file content
  cat fileName
  more fileName

8.delete dir/file
  rm -rf dirName/fileName

9.copy file
  cp source target

10.move file
   mv source target

11.chang the mode of dir/file
  chmod xxx dirName/fileName

Note: xxx is number from 1 to 7.
      1 means the dir/file is executable
      2 means the dir/file is writable
      4 means the dir/file is readable

12.chang the owner of dir/file
  chown -R NewUser:NewGroup dirName/fileName

13 vi

14 shutdown

15 reboot

16
////////////////////////////////////////////////////////////////

1.*.tar
  tar xvf FileName.tar
  tar cvf FileName.tar DirName
 
2.*.tar.gz
  tar zxvf FileName.tar.gz
  tar zcvf FileName.tar.gz DirName

3.*.tgz
  tar zxvf FileName.tgz

4.*.gz
  gunzip FileName.gz
  gzip FileName

5.*.Z
  uncompress FileName.Z
  compress FileName

6.*.tar.Z
  tar Zxvf FileName.Z
  tar Zcvf FileName.tar.Z DirName

7.*.bz
  bunzip2 FileName.bz
  bzip2 -z FileName 

8.*.bz2
  bunzip2 FileName.bz2
  bzip2 -z FileName

9.*.tar.bz2
  tar jxvf FileName.tar.bz2
  tar jcvf FileName.tar.bz2 DirName

10.*.zip
  unzip FileName.zip
  zip FileName.zip DirName

11.*.rar
   rar x FileName.rar
   rar a FileName.rar DirName

12.*.lha
   lha FileName.lha
   lha FileName.lha FileName

13.*.cpio
    AIX/Solaris : cpio -idcu < xxx.cpio
    Linux :       cpio -idmv < xxx.cpio
   
    chmod xxx dirName/fileName
chmod +x *

 sftp myname@host
  常用命令有:

quit --退出
ls   --查看远程目录文件
cd   --改变远程目录路径
lls  --查看本地目录文件
lcd  --改变本地目录路径
put  --将本地文件上传到远程目录
get  --下载远程目录文件到本地

 

AIX: 输入smitty security 进入图形界面。 aix enter进入 ,f3退出

AIX建组/删除组命令,mkgroup/rmgroup

 

CPIO

aix,
1. compress
     # find /opt/IBM/ -print | cpio -oav > xx.cpio

2.Uncompress, restore previous backup
   # cpio -idmv < xx.cpio

 

/////////////////////////

 

1  &  在命令行末尾加 & 表示让该命令后台运行。

2  bg

3  fg  

4 lsof

5 lsof -i :端口号  查询次端口被哪个进程占用

6 history


  

原创粉丝点击