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