linux-extension Application: Vim editing skills, distribution network yum source, source code compilation and installation

Source: Internet
Author: User

permissions are numeric:

Basic Permissions r=4 w=2 x=1

Additional permissions suid=4 sgid=2 Stiky bit=1

Set permissions by using numeric form



Space occupied by the statistics file: Du

du [Options] ... [Directory or file]

-S: Counts the total amount of space occupied by each parameter only

-H: Provides easy-to-read capacity units (K, M, etc.)

[Email protected] ~]# du-sh/root//etc//boot/

4.0M/root/

35M/etc/

132M/boot/


Date: View/adjust system date Time

-date +%f #年月日

-date +%r #时间

-date + "%y-%m-%d%h:%m:%s" #年月日, seconds and minutes

-date-s "Yyyy-mm-dd HH:MM:SS" #修改日期时间




Vim text editing

Cursor Jump

Home key or ^, number 0 jump to beginning of line

End key or jump to end of line

PgUp key, PgDn key to page up and down

1G or GG jumps to the first line of the entire file

G jump to the end of the entire file line


Copy and paste

yy, Nyy copy one row, n rows at the cursor

P





/ROOT/.VIMRC #此文件默认没有, but can be modified in vim configuration

Vim/root/.vimrc







Soft connections and hard connections

difference : Soft Connection -if the original file or directory is deleted, the connection file will expire

Soft connections can be stored in different partitions/file systems

Hard Connect -The connection file is still available if the original file is deleted

Hard connections with original files must be in the same partition/file system

Hard Connect does not support creating directories


Create soft connection (shortcut): ln-s original File/directory soft connection file

[Email protected] ~]# ln-s/etc/sysconfig/network-scripts/ifcfg-eth0/opt/eth0

[Email protected] ~]# ls-l/opt/eth0

lrwxrwxrwx. 1 root root 41 November 14:11/opt/eth0-/etc/sysconfig/network-scripts/ifcfg-eth0


Create a hard connection : ln Raw file hard connect file





System Environment variables

PATH:





./Currently running the program



-mtime + or-change the number of days (only past time)


0.0.0.0:22

Indicates that all IP addresses (network cards) of this machine are open port 22nd



linux-extension Application: Vim editing skills, distribution network yum source, source code compilation and installation

Related Article

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.