Linux Common commands

Source: Internet
Author: User
Tags clear screen

Find
Find/Folder Search name
Reading text
Cat file name
Create new files and folders
mkdir folder name touch file name (with suffix)
Delete files and folders
RM-RF  folder name rm-f  file name (with suffix)
Modify and save text
VI file name//     Enter edit mode i             //insert character x             //delete current character: dd            //delete current line: U             //Redo Previous action: P             //copy deleted line before ESC exit Edit: Wq           / /Save and exit: q!           Forced exit does not save
View background processes
Ps-ef
Kill process
Kill-9 Process Number
Clear Screen
Clear
View background processes
Ps-aux|grep Tomcat (either MySQL or redies)
Copying files
Cp-r/home/work/  /home/temp/(Copy the work folder to temp)

查看内存占用情况

  Cat/proc/meminfo or Free-h

压缩和解压文件.tar.gz 
Decompression: Tar zxvf FileName.tar.gz compression: Tar zcvf FileName.tar.gz dirName

查看后台所有进程

PS aux | Less


查询端口是否占用及应用

PS c:\codespace\projectspace\pythonformark\pyweb\www> NETSTAT-ANO|FINDSTR 9000   //query port is occupied by  TCP    0.0.0.0:9000           0.0.0.0:0              LISTENING       84032  TCP    [::]:9000              [::]:0                 LISTENING       84032PS c:\codespace\projectspace\pythonformark\pyweb\www> tasklist |findstr 84032    //query corresponding application Eclipse.exe                  84032 Console                    7    677,788 K

 
 


Linux Common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.