Auto-complete function of Mac Terminal

Source: Internet
Author: User
Tags rar

Record some of the terminal's use of commands, with automatic completion of the configuration, mainly afraid of forgetting later.

1. Terminal Auto-complete configuration

Open Terminal, enter:

Nano. Inputrc

Write in the file:

Set Completion-ignore-case on
Set show-all-if-ambiguous on
Tab:menu-complete

CTRL + O, enter, restart the terminal, auto-complete Press the TAP key on OK.

2. Common commands

PWD Current Working directory

CD (without parameters) into root

CD (folder) access to folders

Cd.. Parent Directory

cd ~ Back to Root

CD-Returns the last visited directory

RM File name Delete

Cat file name (|less) to view files under Terminal

LS lists all files in the directory

CP file name destination directory copy files to target directory

~ stands for root such as: ~/document/cpp2/

Mkdiv new Folder

g++ source file name compile source files, generate a.out

./file name run for example:./a.out < input file name > output file name

Control+d Interrupt a.out operation

Nano scripting language Ctrl+o storage

Nano .... SH Open

Bash .... SH Run script

echo "... $i ..." Output statement

TAR-ZXF abc.tar.gz tar file extract

SSH [email protected] Remotely connect 222 servers to the root account

Unrar x abc.rar rar file decompression, need to install RAR tool

Transferred from: http://blog.csdn.net/u013346305/article/details/52105316

Auto-complete function of Mac Terminal

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.