terminal commands mac cheat sheet

Read about terminal commands mac cheat sheet, The latest news, videos, and discussion topics about terminal commands mac cheat sheet from alibabacloud.com

IOS-MAC Terminal commands

| 使用举例 ---------|---------------------------|------------------ uname | 显示操作系统的有关信息 | uname -a clear | 清除屏幕或窗口内容 | clear env | 显示当前所有设置过的环境变量 | env who | 列出当前登录的所有用户 | who whoami | 显示当前正进行操作的用户名 | whoami tty | 显示终端或伪终端的名称 | tty stty | 显示或重置控制键定义 | stty -a du | 查询磁盘使用情况 | du -k subdir df | 显示文件系统的总空间和可用空间 | df w | 显示当前系统活动的总信息

Mac Common Terminal commands

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 Common Commands

. -name "*.c" -print file 显示文件类型 file filename pg 分页格式化显示文件内容 pg filename more 分屏显示文件内容 more filename Select action head 显示文件的最初几行 head -20 filename dircmp 比较两个目录的内容 dircmp dir1 dir2 tail 显示文件的最后几行 tail -15 filename cut 显示文件每行中的某些域 cut -f1,7 -d: /etc/passwd colrm 从标准输入中删除若干列 colrm 8 20 file2 ' Paste transverse connection file paste File1 file2 ln joins file ln-s file1 file2 diffCompare and display the differences of two filesdiff file1 File2 sortSort or merge Files sort-d-f-u file

Mac terminal commands and Pycharm frequently used shortcut key record

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

MAC Terminal commands run Java

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

MAC Terminal commands run Java

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

Mac comes with terminal commands (which I often use myself)

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

Use terminal commands under Mac to connect to a remote Linux system via the SSH protocol instead of Windows putty

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

commands for displaying tree in Mac Terminal

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; [

MAC Terminal Commands Summary

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

Mac Terminal commands Daquan 1

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

Overview of MAC terminal commands

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

Terminal Commands Mac

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

Mac Terminal commands

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

Workaround for Mac terminal commands to fail

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 commands

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

Mac Common Terminal commands

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

Mac System Terminal command line does not execute commands always appear command not found workaround

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

Total Pages: 2 1 2 Go to: Go

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.