编程知识 cdmana.com

Software interview summary 2-linux

One 、linux Basic commands

  ls View files in directory

  cd /home Get into home Catalog

  cd .. Return to the previous directory

  cd ../.. Returns the two directories above

  mkdir dir1 Create a name ’dir1‘ Catalog

  rmdir drl1 Delete a name called ’dir1‘ Catalog ( Only empty directories can be deleted )

  rm -f Delete a name called ’file1‘ The file of , -f Ignore nonexistent files

  rm-rf/mulu Delete directory files and subdirectory files

  cp /test1/file1 /test2/file2 take test1 In the catalog file1 Copied to the test2 Next , And change the name of the file file2

  mv /test1/file1 /test3/file3 take test1 In the catalog file1 Move to test3 Next , And change the name of the file file3

  ps -ef|grep XXX Show process pid

  kill End process         Through the first ps Command query id adopt kil-9 Suspend the process

  tar -xvf file.tar  decompression tar package

  unzip file.zip decompression zip package

  unrar e flie.rar  decompression rar package

  free -m Check server memory usage

  tail -1000 xx.out Check the log    tail -f xxx.out

  netstat -anp|grep Port number Query whether a port is occupied

    

版权声明
本文为[Test - relay]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224214721870x.html

Scroll to Top