Linux from Getting started to mastering (i)

Source: Internet
Author: User
Tags create directory

1. Installation of virtual machines

2. Virtual machine settings

Note:

    • If NAT mode is selected

The matching NIC is:

Through this virtual network card and the local communication, can only communicate with the local computer, if the computer can access the Internet, the virtual machine can also access the Internet

    • If you have chosen: host-only

The matching NIC is:

With this virtual network card to communicate with the native, can only communicate with the local computer

    • If you choose to: Bridge

The matching NIC is:

Through this real network card communication with the computer, not only can communicate with the local computer, but also with other LAN's other network segment of the PC to communicate

3. Windows and Linux transfer tool: WINSCP

4. Linux commands

    • DF: Looking at the directory size is similar to the point in Windows where the "My Computer" feature is similar.
    • To hide files in a Linux system, simply add a dot (.) before the file name.
    • Ls-a View all files in the directory (including hidden files). A--all
    • LS/: The file under the root directory is viewed.
    • Ls-l: L--long.

5. Ls-l: The output results are as follows:

In a Linux system, the corresponding user of each file is divided into 3 categories:

    • The owner uses U to represent
    • The owning group is represented by G.
    • Other people use O to indicate

1): Represents the number of references

2): First root: Indicates owner

3): Second root: Indicates the owning group

4): 1207 indicates the size of the file, the default unit is: bytes

Can be viewed by the command: LS-LH, H: Represents the meaning of human, humanized display, said: The K is displayed K, which is m on the display m

: Indicates the time when the file was last modified and, if not modified, the time that the file was created

: The first "-" represents a file, "D" means the directory "L" means that link represents a soft connection

File permissions: R Read, w write, X Execute

There are letters for permission, no letters (with-) for no permissions

5) View the properties of the directory itself, the command is: ls-ld

6) View the file's I node (inode), the command is: ls-i, you can see the file or folder

6. File directory operation: New, delete

    • Create directory: mkdir directory name
    • Create directory: Mkdir-p directory 1/directory 2, so even if directory 1 does not exist, directory 2 can also be created successfully
    • Create multiple directories: mkdir directory 1 directory 2 directory 3 ...
    • "/" stands for root directory, ".." Represents the previous table of contents, "~" represents the home directory, "-" represents the previous directory, "." Represents the current directory
    • Switch to any directory: just the name of the CD directory
    • Displays the absolute path to the current directory: Pwd:print working directory
    • Delete Empty directory: RmDir directory name
    • Delete Non-empty directory: RM-RF directory name
      • -R is recursive down, no matter how many levels of directory, delete
      • -F is directly forcibly deleted, without any hint of meaning

7. File Directory operation: Copy

    • CP source File Destination directory: Copy file

    • Cp-r Source Directory Destination directory: Copy directory
    • Delete File command: Rm-f/var/log/httpd/access.log so you can force a file to be deleted
    • Copy multiple files to the target path: Cp/root/anaconda-ks.cfg/root/install.log/root/install.log.syslog/tmp/japan
    • Copy shortcut key inside Xshell: CTRL + Insert
    • To view the properties of a file command: Ls-lh Install.log, the result is as follows:
    • Copy a file to the target directory and the property does not change (including the creation time) command as follows: Cp-p
      • P:property means of representing attributes
    • Copy file and rename it:

8. File Directory operation: MV (cut)

    • Cut the directory to the target path and rename it:

    • Modify the file and folder names in this directory:

      • Test is the source folder name
      • Nvshen is the modified folder name

  

Linux from Getting started to mastering (i)

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.