Linux Common commands

Source: Internet
Author: User

1. mkdir make Directorys Create directory example: MKDIR/DATA;CD/;mkdir data Create data directory at root/Bottom

2. LS list directory file example: LS/Reagan/directory directory and file LS is the directory and file below the current file

Parameter:-L (Long) long format-D (directorys) View Directory

3. Change directory path (switch directory) example: CD/ETC switch to the ETC directory under the root directory

4. PWD Print Work directory (displays the current path).

5, touch Create a file or update the timestamp of the file, if the file is in, only update the file timestamp, if the file does not exist, re-create the file.

6, Echo printout content, with "> or >>" can be overwritten with the file and append content, ">" meaning redirect, will clear all the previous data in the file, ">>" for the content appended, only the end of the file to append the required content, There is also a more complicated and less common command like printf.

VI: the equivalent of Windows Notepad, relatively simple. Example: VI oldboy.txt

vim: similar to VI, more complex than VI, more complex editor. If you do operations, such as learning to use the editor. Text Editor: EmEditor: Complex editor: Complex function, highlighting, auto indent, etc.

Relative path and absolute path:

Windows absolute Path:

E:\ALEX\SB, the path from the beginning (the drive letter);

Linux absolute path: Cat/etc/sysconfig/network-scripts/ifcfg-eth0, from the follow/start path.

Relative path: A path that does not start from the root and does not begin with a scratch (/heel). Relative paths are relative to the path of the current file.

Linux Common commands

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.