标签: 24 篇 linux 相关的文章

centos 配置dhcp简记

yum -y install dhcp

配置文件:/etc/dhcp/dhcpd.conf

示例配置文件:/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example

default-lease-time 7200;
max-lease-time 14400;
subnet 10.1.119.0 netmask 255.255.255.0 {
  option routers 10.1.119.128;
  option domain-name-servers 10.1.102.2;
  range 10.1.119.200 10.1.119.220;
}
阅读全文 ~

CRLF to LF

You can use vim programmatically with the option -c {command} :

Dos to Unix:

vim file.txt -c "set ff=unix" -c ":wq"

Unix to dos:

vim file.txt -c "set ff=dos" -c ":wq"

"set ff=unix/dos" means change fileformat (ff) of the file to Unix/DOS end of line format

":wq" means write file to disk and quit the editor (allowing to use the command in a loop)

阅读全文 ~