vim liunx directory (and forgot to write)

vim search
view mode
input / searches +

Search shortcut
n search down
N upward search

vim searched content are highlighted, not cancel, exit or highlight
Cancel Highlight (two kinds)
A: NOH

b. can not be found in a search of content

Batch select the Delete
ctrl + v -> then select the cursor -> press d

ctrl+v

Move the cursor to select

Press the Delete key d

Bulk add
ctrl + v -> cursor to select -> I -> Enter Add Content -> Press twice esc
Ctrl + v

Cursor to select

enter the edit mode shift + i

Typing

Press twice esc

vim troubleshooting
hidden files
ls -a
when editing the file there will be a .swp file
.swp produced under what circumstances the
first case
the normal exit is not generated .swp
If it is not a normal exit is generated. swp files
only in the case file does not .swp normal exit of vim

The solution .swp the
first solution
does not save the modified file contents directly delete .swp
second solution is
to restore the modified content
first step
vim -r File
: WQ save and exit
the second step
delete files .swp


The second case
when two people or you use two windows open simultaneously will produce a file .swp document
solutions
themselves to see whether they open two windows for editing
or whether the file is opened by other colleagues
catalog file structure
1.Linux everything from directory / start
2.Linux directory is a hierarchical
3.Linux all equipment must be mounted before a visit
to mount
the process of adding new devices to mount Linux second disk or device ( U-disk drive)

The first milestone
optical drive into IOS image

The second milestone
to the device to open a window for loading
the new directory or a directory already exists (mnt) temporary mount point
mount / dev / cdrom / mnt
If there is already a mount point (directory) mounted directly within the content hide the original content, original content is displayed after unloading (recommended empty directory)

The third milestone
unloading equipment
umount / mnt

After the hard disk partition named
sda first disk
sdb second block plate

a first partition plate sda1 of
the second disk partition sda2 of a
third partition sda3 first disk
directory structure and meaning

Storage directory binary ├── bin command binaries
[system] kernel ├── boot bootloader +
├── dev Device hard disk CD-ROM device
├── etc storage system configuration files
├── home ordinary user's home directory
├── lib library library library files
├── lib64 lib64 system is 64-bit library files
├── lost + found restore lost files
├── mnt temporary directory mount point mount point --- ---- to the device provides an entry
├── opt option to install third-party software directory
├── proc process directory of virtual directory content is the memory information (process, kernel, software) in order to solve everything file
root Palace root ├── the user's home directory
├── sbin super binary super command with only the root user can command the
├── selinux selinux and its configuration file directory path where the
file storage service ├── srv directory
├── sys virtual the directory memory information
├── tmp temp temporary file storage location
├── usr store the user program
└── var variable often Files stored in directories such as changes in the system log
important files in each directory
/ etc
1./etc/sysconfig/network-scripts/ifcfg-eth0
1 TYPE = Ethernet # == Ethernet Type
4 BOOTPROTO = none # obtains an IP address mode
1.DHCP automatically delivers BBTPROTO = DHCP IP address
sent by the home routers DHCP address 192.168.1.x
192.168.1.139/24
192.168. 1.1-192.168.1.254
2. manually configure the IP address BOOTPROTO = none BOOTPROTO = static
unique within 10.0.0.200/24 virtual machine
name 12 nAME = eth0 # NIC
13 UUID = 007885a1-f43f-458e -93e8-0a85242f0f9d # system default to all devices assign a unique identifier
14 dEVICE = eth0 # hardware device name
15 ONBOOT = yes # whether to automatically connect the boot
16 IPADDR = 10.0.0.200 # IP address
17 PREFIX = 24 # subnet mask determines the current network available IP number of
operators 139.226.172.110/29 how to convert
http://www.ab126.com/goju/1840.html
PREFIX = = 255.255.255.0 24-====== NETMASK

18 GATEWAY = 10.0.0.254 # gateway to the Internet out of the front door
19 DNS1 = 223.5.5.5 # DNS domain name resolved to an IP address of your DNS server to the domain name server to give you access to the IP address of your domain name by visiting the IP address is the final

Public DNS IP addresses
Ali cloud DNS
223.5.5.5
223.6.6.6
Google
8.8.8.8
Baidu
114.114.114.114
Beijing Unicom
202.106.0.20

  1. / etc / hostname hostname configuration file Centos7.x / etc / sysconfig / network Centos6.x
    how to change the host name of the
    first permanent modification method
    to directly modify configuration files need to restart the computer
    vim / etc / hostname
    second method to temporarily modify the restart failure
    hostname oldboyedu
    third method temporary + permanent
    hostnamectl set-hostname oldboy
  2. correspondence between the / etc / hosts host name and IP address (local DNS domain name server)
    Linux system configuration: / etc / hosts configuration inside
    windows system configuration: c: \ windows \ System32 \ drivers \ etc \ hosts inside configuration
    scenario used : when tested using the company's products

Guess you like

Origin blog.51cto.com/14465325/2427171