Read about terminal commands mac cheat sheet, The latest news, videos, and discussion topics about terminal commands mac cheat sheet from alibabacloud.com
PWD Current Working directoryCD (without parameters) into rootCD (folder) access to foldersCd.. Parent Directorycd ~ Back to RootCD-Returns the last visited directoryRM File name DeleteCat file name (|less) to view files under TerminalLS lists all files in the directoryCP file name destination directory copy files to target directory~ stands for root such as: ~/document/cpp2/Mkdiv new Folderg++ source file name compile source files, generate a.out./file name run for example:./a.out Control+d Int
Mac Terminal command:1.root Permissions$sudo Su-2. Navigate to the specified folder location$CD/users/Computer Name/desktop (navigate to Desktop)3. Create a new Folder$mkdir folder name4. Program installation$PIP Install program nameOr$brew Install program name5. Create a virtual environment$pip Install Virtualenv$VIRTUALENV Environment NameOr$python-m VENV environment name6. Delete files (in this directory
Link Address: http://www.cnblogs.com/wangrui-techbolg/archive/2012/12/29/2839047.htmlSince the MAC is already installed in the Java environment, it is convenient to run the Java command directly from the class.Compile a Java file: javac/users/username/desktop/helloworld.java (after running will get a Helloworld.class file, store directory in Desktop)Run: First to CD to Helloworld.class directory, then: Java HelloWorld (HelloWorld is the class name wit
Since the MAC is already installed in the Java environment, it is convenient to run the Java command directly from the class.Compile a Java file: javac/users/username/desktop/helloworld.java (after running will get a Helloworld.class file, store directory in Desktop)Run: First to CD to Helloworld.class directory, then: Java HelloWorld (HelloWorld is the class name without suffix).Add editsRecently look at the design pattern, the inside of the code is
Check which directory is currently in PWDJump to which directory, remember CD is the meaning of change directoryJump Directory CD Directory nameJump to home directory CD ~Skip to the top level directory CD.Jump root directory CD/Returns the directory CD for the last actionNew directory mkdir directory nameSee which folders are in the current directory LSRemove directory rmdir directory nameGet root Permissions sudo Mac comes with
directive: SSH [email protected]Case: wangmingdemacbook-pro:~ xxxxxxxxxx$ ssh [email protected]The authenticity of host ' xxxx.net (xxx.xxx.xxx.xxx) ' can ' t be established.RSA key fingerprint is 13:82:21:f3:47:ac:15:44:f5:d0:c4:65:a0:5c:cc:06.Is you sure want to continue connecting (yes/no)? YesWarning:permanently added ' xxxx.net (xxx.xxx.xxx.xxx) ' (RSA) to the list of known hosts.[email protected] ' s password:The following operation instructions are the same as the putty.Use
Looking for a long while finally found how the Mac under the terminal to show the tree command, as the person from the Linux to turn around, has not adapted to the Mac Finder, or like to view the file under the command line.Command:' s; [^/]*/;|____;g;s;____|; |; GThen manually alias it and add it in your. Bash_profile or. ZSHRC:Tree="Find." -print | Sed-e ' s; [
deny receiving of messagesMESG NKorn shell commandCommand nameFunction descriptionExamples of UseHistoryList several recently executed commands and numbersHistoryRRepeatedly executes a command that has been recently executedR-2AliasTo define an alias for a commandAlias Del=rm-iUnaliasTo cancel the definition of an aliasUnalias delOther commandsCommand nameFunction descriptionExamples of UseUnameDisplays information about the operating systemUname-aCl
deny receiving of messagesMESG NKorn shell commandCommand nameFunction descriptionExamples of UseHistoryList several recently executed commands and numbersHistoryRRepeatedly executes a command that has been recently executedR-2AliasTo define an alias for a commandAlias Del=rm-iUnaliasTo cancel the definition of an aliasUnalias delOther commandsCommand nameFunction descriptionExamples of UseUnameDisplays information about the operating systemUname-aCl
network hostPing hpc.sp.net.edu.cnMailRead and send emailsMailWriteSend messages to another userWrite username pts/1MesgAllow or reject receiving packetsMesg nKorn shell commandCommand nameFunction DescriptionExampleHistoryLists the commands and numbers that have been executed recently.HistoryRRepeat the execution of a recent command.R-2AliasDefine an alias for a commandAlias del = Rm-IUnaliasCancels the definition of an alias.Unalias delOther comman
1, hit the terminal.Enter the project root directoryCD entryLS View sub-files under current directoryVim is to modify the current directory file Note: In this directory you can also create a new directoryESC+:+WQ is to modify the backmkdir Creating a DirectoryMV Moving filesExample: Want to move Mac.text to desktop mv/system/library/extensions/mac.text/user/user name/desktopRM Delete FileCP Copy FilePWD Displays the path name of the current directoryDate Displays the current date and time of the
Displays the name of the terminal or pseudo terminal
Tty
Stty
Display or reset control key definitions
Stty-a
Du
Querying disk usage
Du-k SubDir
Df
Displays the total and free space of the file system
Df/tmp
W
Displays the total information for the current system activity
W
Wen/kekemars
Step1. Enter in Terminal: Export path= "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/x11/bin" then the command can be used temporarily, Step2. open-e ~/.bash_profile Open the. bash_profile file in a text editor: Step3. Change the PATH environment variable setting, add this line, export path= "/usr/bin:/bin:/ Usr/sbin:/sbin:/usr/local/bin:/usr/x11/bin "It's no problem to save it again.Workaround for Mac
MAC Terminal statementNumber of words Read 111 comments 3 likes 3 PWD Current Working directoryCD (without parameters) into rootCD (path name) into the folderCd.. Parent Directorycd ~ Back to RootCD-Returns the last visited directoryRM File name DeleteCat file name (|less) to view files under TerminalLS lists all files in the directoryCP file name destination directory copy files to target directory~ stan
Command name
Function description
Application examples
Cat
Show or connect files
Cat filename
Od
Display the contents of a non-text file
od-c filename
Cp
Copy a file or directory
CP file1 File2
Rm
Delete a file or directory
RM filename
Mv
Change the file name or directory
MV File1 File2
Find
Finding files using matching expressions
Configure the Android development environment, change bash_profile This file, finally somehow only the CD command can execute, I guess the Bash_profile file can be modified after not saving the resulting Save command is: source. bash_profileHere's my solution:1, on the command line, enter:Export path=/usr/bin:/usr/sbin:/bin:/sbin:/usr/x11r6/bin This guarantees that command-line commands can be used temporarily. Do not close the
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.