Article From:https://www.cnblogs.com/maqingyuan/p/9125804.html

Directory operation

Use example of command name function descriptionMKDIR creates a directory MKDIR dirnameRmdir delete a directory rmdir dirnameMvdir moves orRename a directory mvdir dir1 dir2CD changes the current directory CD dirnamePWD displays the path name of the current directory, PWDLs displays the contents of the current directoryLs -laDircmp compares the contents of two directories dircmp dir1 dir2

File operation

Use example of command name function descriptionCat displays or connects the file cat filenamePG paging formatting displays file contents PG filenameMore screen display fileContent more filenameOd displays the contents of non text files OD -c filenameCP copy file or directory CP file1 File2RM delete filesOr directory RM filenameMV change file name or directory MV file1 File2Ln join file ln -s file1 File2Find use a pieceMatch expression search file find. -name "*.c" -printFile displays the file type file filenameOpen uses the default program to open the file openFilename

Selection operation

Use example of command name function descriptionHead displays the first few lines of the file head -20 filenameTail displays the last few lines of the file tail -15 filenameCut displays some fields cut -f1,7 -d: /etc/passwd in each row of the file.Colrm deletes several columns colrm 820 File2 from standard input.PasteCrosswise connection file paste file1 File2Diff compares and displays the differences between the two files diff file1 File2Sed non interactive flow editor sed "s/re"D/green/g "filenameGrep finds grep "^[a-zA-Z]" filename in the file by mode.Awk finds and processes schema awk'{pri in the file.NT $1 $1}'filenameSort sort or merge file sort -d -f -u file1Uniq remove duplicate lines uniq file1 File2 from filesComm displays public and non public rows of two ordered files comm file1 File2WC statistics file number, number of words and number of rows WC filenameNL adds line number n to the fileL file1 > File2

Safe operation

Use example of command name function descriptionPasswd modifies user password passwdChmod changes the permissions of files or directories Chmod ug+x filenameUmaskDefinition of the permission mask umask 027 for creating a fileChown changes the file or directory of the owner chown newowner filenameChgrp changes the group of files or directoriesChgrp staff filenameXlock locks xlock -remote to the terminal

Programming operation

Use example of command name function descriptionMake maintains the latest version of executable program makeTouch update file access and modification time touch -m 05202400 filenaMeDBX command line interface debugger DBX a.outXde graphical user interface debugger xde a.out

 

There are many more terminal commands. I am sorry about this.

More commands please click on

 

 

https://blog.csdn.net/u013896628/article/details/54377364

Similar Posts:

Link of this Article: Mac terminal command Encyclopedia

Leave a Reply

Your email address will not be published. Required fields are marked *